pages/_app/immutable/nodes/2.5235249e.js

16 lines
209 KiB
JavaScript
Raw Normal View History

2023-10-18 22:08:44 +02:00
import{s as safe_not_equal,e as empty,i as insert_hydration,d as detach,A as compute_rest_props,B as setContext,C as assign,D as exclude_internal_props,r as create_slot,f as element,g as claim_element,h as children,E as set_dynamic_element_data,F as action_destroyer,G as listen,u as update_slot_base,v as get_all_dirty_from_scope,w as get_slot_changes,H as is_function,I as add_render_callback,J as run_all,K as bubble,p as binding_callbacks,L as identity,M as getContext,a as space,c as claim_space,N as set_attributes,x as append_hydration,l as text,m as claim_text,j as attr,n as set_data,O as svg_element,P as claim_svg_element,Q as compute_slots,R as createEventDispatcher,S as add_flush_callback,y as noop$1,z as component_subscribe,k as set_style,T as destroy_each,o as onMount}from"../chunks/scheduler.c252431e.js";import{S as SvelteComponent,i as init,a as transition_in,g as group_outros,t as transition_out,c as check_outros,f as create_bidirectional_transition,b as create_component,d as claim_component,m as mount_component,e as destroy_component,h as bind,n as now,l as loop}from"../chunks/index.055e1bc1.js";import{w as writable}from"../chunks/index.0dba420f.js";function ensure_array_like(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function get_spread_update(t,e){const r={},o={},n={$$scope:1};let i=t.length;for(;i--;){const a=t[i],s=e[i];if(s){for(const l in a)l in s||(o[l]=1);for(const l in s)n[l]||(r[l]=s[l],n[l]=1);t[i]=s}else for(const l in a)n[l]=1}for(const a in o)a in r||(r[a]=void 0);return r}function get_spread_object(t){return typeof t=="object"&&t!==null?t:{}}const prerender=!1,ssr=!1,_page=Object.freeze(Object.defineProperty({__proto__:null,prerender,ssr},Symbol.toStringTag,{value:"Module"})),bluetoothState=writable("DISCONNECTED"),raceFullState=writable(),settings=writable();var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},indexLight={exports:{}},indexMinimal={},minimal$1={},aspromise,hasRequiredAspromise;function requireAspromise(){if(hasRequiredAspromise)return aspromise;hasRequiredAspromise=1,aspromise=t;function t(e,r){for(var o=new Array(arguments.length-1),n=0,i=2,a=!0;i<arguments.length;)o[n++]=arguments[i++];return new Promise(function(l,u){o[n]=function(c){if(a)if(a=!1,c)u(c);else{for(var d=new Array(arguments.length-1),f=0;f<d.length;)d[f++]=arguments[f];l.apply(null,d)}};try{e.apply(r||null,o)}catch(h){a&&(a=!1,u(h))}})}return aspromise}var base64$1={},hasRequiredBase64;function requireBase64(){return hasRequiredBase64||(hasRequiredBase64=1,function(t){var e=t;e.length=function(s){var l=s.length;if(!l)return 0;for(var u=0;--l%4>1&&s.charAt(l)==="=";)++u;return Math.ceil(s.length*3)/4-u};for(var r=new Array(64),o=new Array(123),n=0;n<64;)o[r[n]=n<26?n+65:n<52?n+71:n<62?n-4:n-59|43]=n++;e.encode=function(s,l,u){for(var h=null,c=[],d=0,f=0,m;l<u;){var p=s[l++];switch(f){case 0:c[d++]=r[p>>2],m=(p&3)<<4,f=1;break;case 1:c[d++]=r[m|p>>4],m=(p&15)<<2,f=2;break;case 2:c[d++]=r[m|p>>6],c[d++]=r[p&63],f=0;break}d>8191&&((h||(h=[])).push(String.fromCharCode.apply(String,c)),d=0)}return f&&(c[d++]=r[m],c[d++]=61,f===1&&(c[d++]=61)),h?(d&&h.push(String.fromCharCode.apply(String,c.slice(0,d))),h.join("")):String.fromCharCode.apply(String,c.slice(0,d))};var i="invalid encoding";e.decode=function(s,l,u){for(var h=u,c=0,d,f=0;f<s.length;){var m=s.charCodeAt(f++);if(m===61&&c>1)break;if((m=o[m])===void 0)throw Error(i);switch(c){case 0:d=m,c=1;break;case 1:l[u++]=d<<2|(m&48)>>4,d=m,c=2;break;case 2:l[u++]=(d&15)<<4|(m&60)>>2,d=m,c=3;break;case 3:l[u++]=(d&3)<<6|m,c=0;break}}if(c===1)throw Error(i);return u-h},e.test=function(s){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(s)}}(base64$1)),base64$1}var eventemitter,hasRequiredEventemitter;function requireEventemitter(){if(hasRequiredEventemitter)return eventemitter;hasRequiredEventemitter=1,eventemitter=t;function t(){this._listeners={}}return t.prototype.on=function(r,o,n){return(this._listeners[r]||(this._listeners[r]=[])).push({fn:o,ctx:n||
`+r.join(`
`)+`
}`}return o.toString=n,o}codegen.verbose=!1;var fetch_1=fetch,asPromise=requireAspromise(),inquire=requireInquire(),fs=inquire("fs");function fetch(t,e,r){return typeof e=="function"?(r=e,e={}):e||(e={}),r?!e.xhr&&fs&&fs.readFile?fs.readFile(t,function(n,i){return n&&typeof XMLHttpRequest<"u"?fetch.xhr(t,e,r):n?r(n):r(null,e.binary?i:i.toString("utf8"))}):fetch.xhr(t,e,r):asPromise(fetch,this,t,e)}fetch.xhr=function t(e,r,o){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(n.readyState===4){if(n.status!==0&&n.status!==200)return o(Error("status "+n.status));if(r.binary){var a=n.response;if(!a){a=[];for(var s=0;s<n.responseText.length;++s)a.push(n.responseText.charCodeAt(s)&255)}return o(null,typeof Uint8Array<"u"?new Uint8Array(a):a)}return o(null,n.responseText)}},r.binary&&("overrideMimeType"in n&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.responseType="arraybuffer"),n.open("GET",e),n.send()};var path={};(function(t){var e=t,r=e.isAbsolute=function(i){return/^(?:\/|\w+:)/.test(i)},o=e.normalize=function(i){i=i.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var a=i.split("/"),s=r(i),l="";s&&(l=a.shift()+"/");for(var u=0;u<a.length;)a[u]===".."?u>0&&a[u-1]!==".."?a.splice(--u,2):s?a.splice(u,1):++u:a[u]==="."?a.splice(u,1):++u;return l+a.join("/")};e.resolve=function(i,a,s){return s||(a=o(a)),r(a)?a:(s||(i=o(i)),(i=i.replace(/(?:\/|^)[^/]+$/,"")).length?o(i+"/"+a):a)}})(path);var types$1={},hasRequiredTypes;function requireTypes(){return hasRequiredTypes||(hasRequiredTypes=1,function(t){var e=t,r=requireUtil(),o=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function n(i,a){var s=0,l={};for(a|=0;s<i.length;)l[o[s+a]]=i[s++];return l}e.basic=n([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),e.defaults=n([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",r.emptyArray,null]),e.long=n([0,0,0,1,1],7),e.mapKey=n([0,0,0,5,5,0,0,0,1,1,0,2],2),e.packed=n([1,5,0,0,0,5,5,0,0,0,1,1,0])}(types$1)),types$1}var field,hasRequiredField;function requireField(){if(hasRequiredField)return field;hasRequiredField=1,field=a;var t=requireObject();((a.prototype=Object.create(t.prototype)).constructor=a).className="Field";var e=require_enum(),r=requireTypes(),o=requireUtil(),n,i=/^required|optional|repeated$/;a.fromJSON=function(l,u){return new a(l,u.id,u.type,u.rule,u.extend,u.options,u.comment)};function a(s,l,u,h,c,d,f){if(o.isObject(h)?(f=c,d=h,h=c=void 0):o.isObject(c)&&(f=d,d=c,c=void 0),t.call(this,s,d),!o.isInteger(l)||l<0)throw TypeError("id must be a non-negative integer");if(!o.isString(u))throw TypeError("type must be a string");if(h!==void 0&&!i.test(h=h.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(c!==void 0&&!o.isString(c))throw TypeError("extend must be a string");h==="proto3_optional"&&(h="optional"),this.rule=h&&h!=="optional"?h:void 0,this.type=u,this.id=l,this.extend=c||void 0,this.required=h==="required",this.optional=!this.required,this.repeated=h==="repeated",this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=o.Long?r.long[u]!==void 0:!1,this.bytes=u==="bytes",this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=f}return Object.defineProperty(a.prototype,"packed",{get:function(){return this._packed===null&&(this._packed=this.getOption("packed")!==!1),this._packed}}),a.prototype.setOption=function(l,u,h){return l==="packed"&&(this._packed=null),t.prototype.setOption.call(this,l,u,h)},a.prototype.toJSON=function(l){var u=l?!!l.keepComments:!1;return o.toObject(["rule",this.rule!=="optional"&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",u?this.comment:void 0])},a.prototype.resolve=function(){if(this.resolved)return this;if((this.typeDefault=r.defaults[this.type])===void 0?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof n?this.typeDefault=null:this.typeDefault=this.resolvedType.
`,t:" "};function unescape(t){return t.replace(unescapeRe,function(e,r){switch(r){case"\\":case"":return r;default:return unescapeMap[r]||""}})}tokenize$1.unescape=unescape;function tokenize$1(t,e){t=t.toString();var r=0,o=t.length,n=1,i=0,a={},s=[],l=null;function u(b){return Error("illegal "+b+" (line "+n+")")}function h(){var b=l==="'"?stringSingleRe:stringDoubleRe;b.lastIndex=r-1;var w=b.exec(t);if(!w)throw u("string");return r=b.lastIndex,y(l),l=null,unescape(w[1])}function c(b){return t.charAt(b)}function d(b,w,k){var x={type:t.charAt(b++),lineEmpty:!1,leading:k},D;e?D=2:D=3;var I=b-D,L;do if(--I<0||(L=t.charAt(I))===`
`){x.lineEmpty=!0;break}while(L===" "||L===" ");for(var M=t.substring(b,w).split(setCommentSplitRe),N=0;N<M.length;++N)M[N]=M[N].replace(e?setCommentAltRe:setCommentRe,"").trim();x.text=M.join(`
`).trim(),a[n]=x,i=n}function f(b){var w=m(b),k=t.substring(b,w),x=/^\s*\/\//.test(k);return x}function m(b){for(var w=b;w<o&&c(w)!==`
`;)w++;return w}function p(){if(s.length>0)return s.shift();if(l)return h();var b,w,k,x,D,I=r===0;do{if(r===o)return null;for(b=!1;whitespaceRe.test(k=c(r));)if(k===`
`&&(I=!0,++n),++r===o)return null;if(c(r)==="/"){if(++r===o)throw u("comment");if(c(r)==="/")if(e){if(x=r,D=!1,f(r-1)){D=!0;do if(r=m(r),r===o||(r++,!I))break;while(f(r))}else r=Math.min(o,m(r)+1);D&&(d(x,r,I),I=!0),n++,b=!0}else{for(D=c(x=r+1)==="/";c(++r)!==`
`;)if(r===o)return null;++r,D&&(d(x,r-1,I),I=!0),++n,b=!0}else if((k=c(r))==="*"){x=r+1,D=e||c(x)==="*";do{if(k===`
`&&++n,++r===o)throw u("comment");w=k,k=c(r)}while(w!=="*"||k!=="/");++r,D&&(d(x,r-2,I),I=!0),b=!0}else return"/"}}while(b);var L=r;delimRe.lastIndex=0;var M=delimRe.test(c(L++));if(!M)for(;L<o&&!delimRe.test(c(L));)++L;var N=t.substring(r,r=L);return(N==='"'||N==="'")&&(l=N),N}function y(b){s.push(b)}function v(){if(!s.length){var b=p();if(b===null)return null;y(b)}return s[0]}function g(b,w){var k=v(),x=k===b;if(x)return p(),!0;if(!w)throw u("token '"+k+"', '"+b+"' expected");return!1}function _(b){var w=null,k;return b===void 0?(k=a[n-1],delete a[n-1],k&&(e||k.type==="*"||k.lineEmpty)&&(w=k.leading?k.text:null)):(i<b&&v(),k=a[b],delete a[b],k&&!k.lineEmpty&&(e||k.type==="/")&&(w=k.leading?null:k.text)),w}return Object.defineProperty({next:p,peek:v,push:y,skip:g,cmnt:_},"line",{get:function(){return n}})}var parse_1=parse;parse.filename=null;parse.defaults={keepCase:!1};var tokenize=tokenize_1,Root=requireRoot(),Type=requireType(),Field=requireField(),MapField=requireMapfield(),OneOf=requireOneof(),Enum=require_enum(),Service=requireService(),Method=requireMethod(),types=requireTypes(),util=requireUtil(),base10Re=/^[1-9][0-9]*$/,base10NegRe=/^-?[1-9][0-9]*$/,base16Re=/^0[x][0-9a-fA-F]+$/,base16NegRe=/^-?0[x][0-9a-fA-F]+$/,base8Re=/^0[0-7]+$/,base8NegRe=/^-?0[0-7]+$/,numberRe=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,nameRe=/^[a-zA-Z_][a-zA-Z_0-9]*$/,typeRefRe=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,fqTypeRefRe=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;function parse(t,e,r){e instanceof Root||(r=e,e=new Root),r||(r=parse.defaults);var o=r.preferTrailingComment||!1,n=tokenize(t,r.alternateCommentMode||!1),i=n.next,a=n.push,s=n.peek,l=n.skip,u=n.cmnt,h=!0,c,d,f,m,p=!1,y=e,v=r.keepCase?function(R){return R}:util.camelCase;function g(R,O,E){var T=parse.filename;return E||(parse.filename=null),Error("illegal "+(O||"token")+" '"+R+"' ("+(T?T+", ":"")+"line "+n.line+")")}function _(){var R=[],O;do{if((O=i())!=='"'&&O!=="'")throw g(O);R.push(i()),l(O),O=s()}while(O==='"'||O==="'");return R.join("")}function b(R){var O=i();switch(O){case"'":case'"':return a(O),_();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return k(O,!0)}catch{if(R&&typeRefRe.test(O))return O;throw g(O,"value")}}function w(R,O){var E,T;do O&&((E=s())==='"'||E==="'")?R.push(_()):R.push([T=x(i()),l("to",!0)?x(i()):T]);while(l(",",!0));l(";")}function k(R,O){var E=1;switch(R.charAt(0)==="-"&&(E=-1,R=R.substring(1)),R){case"inf":case"INF":case"Inf":return E*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(base10Re.test(R))return E*parseInt(R,10);if(base16Re.test(R))return E*parseInt(R,16);if(base8Re.test(R))return E*parseInt(R,8);if(numberRe.test(R))return E*parseFloat(R);throw g(R,"number",O)}function x(R,O){switch(R){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!O&&R.charAt(0)==="-")throw g(R,"id");if(base10NegRe.test(R))return parseInt(R,10);if(base16NegRe.test(R))return parseInt(R,16);if(base8NegRe.test(R))return parseInt(R,8);throw g(R,"id")}function D(){if(c!==void 0)throw g("package");if(c=i(),!typeRefRe.test(c))throw g(c,"name");y=y.define(c),l(";")}function I(){var R=s(),O;switch(R){case"weak":O=f||(f=[]),i();break;case"public":i();default:O=d||(d=[]);break}R=_(),l(";"),O.push(R)}function L(){if(l("="),m=_(),p=m==="proto3",!p&&m!=="proto2")throw g(m,"syntax");l(";")}function M(R,O){switch(O){case"option":return Y(R,O),l(";"),!0;case"message":return U(R,O),!0;case"enum":return oe(R,O),!0;case"service":return ue(R,O),!0;case"extend":return he(R,O),!0}return!1}function N(R,O,E){var T=n.line;if(R&&(typeof R.comment!="string"&&(R.comment=u()),R.filename=parse.filename),l("{",!0)){for(var C;(C=i())!=="}";)O(C);l(";",!0)}else E&&E(),l(";"),R&&(typeof R.comment!="string"||o)&&(R.comment=u(T)||R.comment)}function U(R,O){if(!nameRe.test(O=i()))throw g(O,"type name");var E=new Type(O);N(E,function(C){if(!M(E,C))switch(C){case"map":X(E);break;case"required":case"repeated":S(E,C);break;case"optional":p?S(E,"proto3_optional"):S(E,"optional");break;case"oneof":ne(E,C);brea
`),u.c(),h=text("."),this.h()},l(p){e=claim_element(p,"SPAN",{class:!0});var y=children(e);r=claim_text(y,"Your Browser is not compatible with this website, as it does not support "),claim_component(o.$$.fragment,y),n=claim_text(y,"."),y.forEach(detach),i=claim_space(p),a=claim_element(p,"SPAN",{class:!0});var v=children(a);s=claim_text(v,`Please use a browser which supports web bluetooth, for example
`),u.l(v),h=claim_text(v,"."),v.forEach(detach),this.h()},h(){attr(e,"class","text-xl text-white rounded-md font-bold border-primary-600 border-4 border-r-4 p-3"),attr(a,"class","text-xl mt-3")},m(p,y){insert_hydration(p,e,y),append_hydration(e,r),mount_component(o,e,null),append_hydration(e,n),insert_hydration(p,i,y),insert_hydration(p,a,y),append_hydration(a,s),f[l].m(a,null),append_hydration(a,h),c=!0},p(p,y){const v={};y&16&&(v.$$scope={dirty:y,ctx:p}),o.$set(v)},i(p){c||(transition_in(o.$$.fragment,p),transition_in(u),c=!0)},o(p){transition_out(o.$$.fragment,p),transition_out(u),c=!1},d(p){p&&(detach(e),detach(i),detach(a)),destroy_component(o),f[l].d()}}}function create_if_block(t){let e,r;return e=new Button({props:{$$slots:{default:[create_default_slot]},$$scope:{ctx:t}}}),e.$on("click",t[3]),{c(){create_component(e.$$.fragment)},l(o){claim_component(e.$$.fragment,o)},m(o,n){mount_component(e,o,n),r=!0},p(o,n){const i={};n&16&&(i.$$scope={dirty:n,ctx:o}),e.$set(i)},i(o){r||(transition_in(e.$$.fragment,o),r=!0)},o(o){transition_out(e.$$.fragment,o),r=!1},d(o){destroy_component(e,o)}}}function create_default_slot_4(t){let e;return{c(){e=text("Connecting...")},l(r){e=claim_text(r,"Connecting...")},m(r,o){insert_hydration(r,e,o)},d(r){r&&detach(e)}}}function create_default_slot_3(t){let e;return{c(){e=text(`web bluetooth
`)},l(r){e=claim_text(r,`web bluetooth
`)},m(r,o){insert_hydration(r,e,o)},d(r){r&&detach(e)}}}function create_else_block(t){let e,r,o;return e=new A({props:{href:"https://www.google.com/chrome/",$$slots:{default:[create_default_slot_2]},$$scope:{ctx:t}}}),{c(){create_component(e.$$.fragment),r=space()},l(n){claim_component(e.$$.fragment,n),r=claim_space(n)},m(n,i){mount_component(e,n,i),insert_hydration(n,r,i),o=!0},i(n){o||(transition_in(e.$$.fragment,n),o=!0)},o(n){transition_out(e.$$.fragment,n),o=!1},d(n){n&&detach(r),destroy_component(e,n)}}}function create_if_block_2(t){let e,r,o;return e=new A({props:{href:"https://apps.apple.com/us/app/bluefy-web-ble-browser/id1492822055",$$slots:{default:[create_default_slot_1]},$$scope:{ctx:t}}}),{c(){create_component(e.$$.fragment),r=space()},l(n){claim_component(e.$$.fragment,n),r=claim_space(n)},m(n,i){mount_component(e,n,i),insert_hydration(n,r,i),o=!0},i(n){o||(transition_in(e.$$.fragment,n),o=!0)},o(n){transition_out(e.$$.fragment,n),o=!1},d(n){n&&detach(r),destroy_component(e,n)}}}function create_default_slot_2(t){let e;return{c(){e=text("Google Chrome")},l(r){e=claim_text(r,"Google Chrome")},m(r,o){insert_hydration(r,e,o)},d(r){r&&detach(e)}}}function create_default_slot_1(t){let e;return{c(){e=text("Bluefy")},l(r){e=claim_text(r,"Bluefy")},m(r,o){insert_hydration(r,e,o)},d(r){r&&detach(e)}}}function create_default_slot(t){let e;return{c(){e=text("Connect")},l(r){e=claim_text(r,"Connect")},m(r,o){insert_hydration(r,e,o)},d(r){r&&detach(e)}}}function create_fragment(t){let e,r,o,n;const i=[create_if_block,create_if_block_1,create_if_block_3,create_else_block_1],a=[];function s(l,u){return l[0]=="DISCONNECTED"?0:l[0]=="UNAVAILABLE"?1:l[0]=="CONNECTED"&&l[1]?2:3}return r=s(t),o=a[r]=i[r](t),{c(){e=element("div"),o.c(),this.h()},l(l){e=claim_element(l,"DIV",{class:!0});var u=children(e);o.l(u),u.forEach(detach),this.h()},h(){attr(e,"class","p-8 flex flex-col")},m(l,u){insert_hydration(l,e,u),a[r].m(e,null),n=!0},p(l,[u]){let h=r;r=s(l),r===h?a[r].p(l,u):(group_outros(),transition_out(a[h],1,1,()=>{a[h]=null}),check_outros(),o=a[r],o?o.p(l,u):(o=a[r]=i[r](l),o.c()),transition_in(o,1),o.m(e,null))},i(l){n||(transition_in(o),n=!0)},o(l){transition_out(o),n=!1},d(l){l&&detach(e),a[r].d()}}}function instance(t,e,r){let o,n;component_subscribe(t,bluetoothState,s=>r(0,o=s)),component_subscribe(t,raceFullState,s=>r(1,n=s));const i=new uaParserExports.UAParser,a=()=>{startBluetooth()};return checkAvailability(),[o,n,i,a]}class Page extends SvelteComponent{constructor(e){super(),init(this,e,instance,create_fragment,safe_not_equal,{})}}export{Page as component,_page as universal};