import{u as e}from"./c1f96d614-DAkctE43.js";import{hD as t}from"./c4b350ac1-BTR_0NaM.js";const n={sm:"(min-width: 640px)",md:"(min-width: 768px)",lg:"(min-width: 1024px)",xl:"(min-width: 1280px)","2xl":"(min-width: 1536px)"};function r(t){return e(n[t])}function i(e){return t(e)}function s(e){if(!e)return null;const t=e.trim();if(t.startsWith("https://lh3.googleusercontent.com/places/"))return t;if(t.startsWith("/images/")&&!t.includes("..")&&!t.includes("%"))return t;try{const e=new URL(t);if("https:"===e.protocol&&e.hostname.endsWith(".googleusercontent.com"))return t}catch{}return null}function o(e){return e&&Array.isArray(e)?e.filter(e=>null!==s(e.url)):[]}function a(e){if(!e||!Array.isArray(e))return null;for(const t of e){const e=s(t.url);if(e)return e}return null}function l(e){if(null===e||"object"!=typeof e)return!1;const t=e;return"string"==typeof t.name&&"number"==typeof t.latitude&&"number"==typeof t.longitude&&isFinite(t.latitude)&&isFinite(t.longitude)&&t.latitude>=-90&&t.latitude<=90&&t.longitude>=-180&&t.longitude<=180}function d(e){return e.filter(l)}function u(e){if(!e||"object"!=typeof e)return null;const t=e,n=["driving","walking","transit","bicycling"].includes(t.travel_mode)?t.travel_mode:"driving",r=t.days&&Array.isArray(t.days)&&t.days.length>0,i=t.mode?t.mode:r?"itinerary":"markers";if(r&&t.days){const e=[];for(const n of t.days)if(n&&"object"==typeof n&&"number"==typeof n.day_number&&Array.isArray(n.locations)){const t=d(n.locations);t.length>0&&e.push({day_number:n.day_number,title:"string"==typeof n.title?n.title:void 0,narrative:"string"==typeof n.narrative?n.narrative:void 0,locations:t})}if(0===e.length)return null;e.sort((e,t)=>e.day_number-t.day_number);const r=e.flatMap(e=>e.locations);return{title:t.title,narrative:"string"==typeof t.narrative?t.narrative:void 0,mode:i,locations:r,days:e,travelMode:n,showRoute:!1!==t.show_route}}if(!t.locations||!Array.isArray(t.locations)||0===t.locations.length)return null;const s=d(t.locations);return 0===s.length?null:{title:t.title,narrative:"string"==typeof t.narrative?t.narrative:void 0,mode:i,locations:s,days:[{day_number:1,narrative:"string"==typeof t.narrative?t.narrative:void 0,locations:s}],travelMode:n,showRoute:!1!==t.show_route}}function c(e,t="driving"){if(e.length<2)return null;let n=e;if(e.length>12){const t=e[0],r=e[e.length-1],i=e.slice(1,-1),s=[],o=i.length/10;for(let e=0;e<10;e++){const t=Math.floor(e*o);i[t]&&s.push(i[t])}n=[t,...s,r]}const r=n[0],i=n[n.length-1],s=n.slice(1,-1),o=new URLSearchParams;o.set("api","1");const a=r.name??r.address??`${r.latitude},${r.longitude}`;o.set("origin",a),r.place_id&&o.set("origin_place_id",r.place_id);const l=i.name??i.address??`${i.latitude},${i.longitude}`;if(o.set("destination",l),i.place_id&&o.set("destination_place_id",i.place_id),s.length>0){const e=s.map(e=>e.name??e.address??`${e.latitude},${e.longitude}`);o.set("waypoints",e.join("|"))}return o.set("travelmode",t),`https://www.google.com/maps/dir/?${o.toString()}`}function g(e){if(!e||"object"!=typeof e)return null;const t=e,n=u(t.input);if(!n)return null;if(!t.enriched_places)return n;const r=n.days.map(e=>({...e,locations:e.locations.map(e=>function(e,t){if(!t||!e.place_id)return e;const n=t[e.place_id];return n?{...e,place_id:n.override_place_id??e.place_id,rating:n.rating??e.rating,rating_count:n.rating_count??e.rating_count,types:n.types??e.types,website:n.website??e.website,maps_url:n.maps_url??e.maps_url,photos:n.photos??e.photos,phone_number:n.phone_number??e.phone_number,weekday_hours:n.weekday_hours??e.weekday_hours,price_level:n.price_level??e.price_level}:e}(e,t.enriched_places))})),i=r.flatMap(e=>e.locations);return{...n,locations:i,days:r}}
/*!-----------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
 * Released under the MIT license
 * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
 *-----------------------------------------------------------------------------*/var p={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{blockComment:["###","###"],lineComment:"#"},folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}};const m=Object.freeze(Object.defineProperty({__proto__:null,conf:p,language:{defaultToken:"",ignoreCase:!1,tokenPostfix:".mips",regEx:/\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,keywords:[".data",".text","syscall","trap","add","addu","addi","addiu","and","andi","div","divu","mult","multu","nor","or","ori","sll","slv","sra","srav","srl","srlv","sub","subu","xor","xori","lhi","lho","lhi","llo","slt","slti","sltu","sltiu","beq","bgtz","blez","bne","j","jal","jalr","jr","lb","lbu","lh","lhu","lw","li","la","sb","sh","sw","mfhi","mflo","mthi","mtlo","move"],symbols:/[\.,\:]+/,escapes:/\\(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/\$[a-zA-Z_]\w*/,"variable.predefined"],[/[.a-zA-Z_]\w*/,{cases:{this:"variable.predefined","@keywords":{token:"keyword.$0"},"@default":""}}],[/[ \t\r\n]+/,""],[/#.*$/,"comment"],["///",{token:"regexp",next:"@hereregexp"}],[/^(\s*)(@regEx)/,["","regexp"]],[/(\,)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\:)(\s*)(@regEx)/,["delimiter","","regexp"]],[/@symbols/,"delimiter"],[/\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d+\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/0[0-7]+(?!\d)/,"number.octal"],[/\d+/,"number"],[/[,.]/,"delimiter"],[/"""/,"string",'@herestring."""'],[/'''/,"string","@herestring.'''"],[/"/,{cases:{"@eos":"string","@default":{token:"string",next:'@string."'}}}],[/'/,{cases:{"@eos":"string","@default":{token:"string",next:"@string.'"}}}]],string:[[/[^"'\#\\]+/,"string"],[/@escapes/,"string.escape"],[/\./,"string.escape.invalid"],[/\./,"string.escape.invalid"],[/#{/,{cases:{'$S2=="':{token:"string",next:"root.interpolatedstring"},"@default":"string"}}],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}],[/#/,"string"]],herestring:[[/("""|''')/,{cases:{"$1==$S2":{token:"string",next:"@pop"},"@default":"string"}}],[/[^#\\'"]+/,"string"],[/['"]+/,"string"],[/@escapes/,"string.escape"],[/\./,"string.escape.invalid"],[/#{/,{token:"string.quote",next:"root.interpolatedstring"}],[/#/,"string"]],comment:[[/[^#]+/,"comment"],[/#/,"comment"]],hereregexp:[[/[^\\\/#]+/,"regexp"],[/\\./,"regexp"],[/#.*$/,"comment"],["///[igm]*",{token:"regexp",next:"@pop"}],[/\//,"regexp"]]}}},Symbol.toStringTag,{value:"Module"}));
/*!-----------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
 * Released under the MIT license
 * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
 *-----------------------------------------------------------------------------*/const f=Object.freeze(Object.defineProperty({__proto__:null,conf:{comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"'",close:"'",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"}]},language:{defaultToken:"",tokenPostfix:".rq",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["add","as","asc","ask","base","by","clear","construct","copy","create","data","delete","desc","describe","distinct","drop","false","filter","from","graph","group","having","in","insert","limit","load","minus","move","named","not","offset","optional","order","prefix","reduced","select","service","silent","to","true","undef","union","using","values","where","with"],builtinFunctions:["a","abs","avg","bind","bnode","bound","ceil","coalesce","concat","contains","count","datatype","day","encode_for_uri","exists","floor","group_concat","hours","if","iri","isblank","isiri","isliteral","isnumeric","isuri","lang","langmatches","lcase","max","md5","min","minutes","month","now","rand","regex","replace","round","sameterm","sample","seconds","sha1","sha256","sha384","sha512","str","strafter","strbefore","strdt","strends","strlang","strlen","strstarts","struuid","substr","sum","timezone","tz","ucase","uri","uuid","year"],ignoreCase:!0,tokenizer:{root:[[/<[^\s\u00a0>]*>?/,"tag"],{include:"@strings"},[/#.*/,"comment"],[/[{}()\[\]]/,"@brackets"],[/[;,.]/,"delimiter"],[/[_\w\d]+:(\.(?=[\w_\-\\%])|[:\w_-]|\\[-\\_~.!$&'()*+,;=/?#@%]|%[a-f\d][a-f\d])*/,"tag"],[/:(\.(?=[\w_\-\\%])|[:\w_-]|\\[-\\_~.!$&'()*+,;=/?#@%]|%[a-f\d][a-f\d])+/,"tag"],[/[$?]?[_\w\d]+/,{cases:{"@keywords":{token:"keyword"},"@builtinFunctions":{token:"predefined.sql"},"@default":"identifier"}}],[/\^\^/,"operator.sql"],[/\^[*+\-<>=&|^\/!?]*/,"operator.sql"],[/[*+\-<>=&|\/!?]/,"operator.sql"],[/@[a-z\d\-]*/,"metatag.html"],[/\s+/,"white"]],strings:[[/'([^'\\]|\\.)*$/,"string.invalid"],[/'$/,"string.sql","@pop"],[/'/,"string.sql","@stringBody"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"$/,"string.sql","@pop"],[/"/,"string.sql","@dblStringBody"]],stringBody:[[/[^\\']+/,"string.sql"],[/\\./,"string.escape"],[/'/,"string.sql","@pop"]],dblStringBody:[[/[^\\"]+/,"string.sql"],[/\\./,"string.escape"],[/"/,"string.sql","@pop"]]}}},Symbol.toStringTag,{value:"Module"}));export{g as a,c as b,o as c,i as d,a as g,s as i,m,u as p,f as s,r as u};
