@truto/truto-jsonata 1.0.26 → 1.0.28
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/main.cjs +571 -364
- package/dist/main.cjs.map +1 -1
- package/dist/module.js +579 -372
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +20 -3
package/dist/main.cjs
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $
|
|
3
|
-
var $
|
|
4
|
-
var $
|
|
5
|
-
var $
|
|
6
|
-
var $
|
|
7
|
-
var $
|
|
8
|
-
var $
|
|
9
|
-
var $
|
|
10
|
-
var $
|
|
11
|
-
var $
|
|
12
|
-
var $
|
|
13
|
-
var $
|
|
14
|
-
var $
|
|
15
|
-
var $dxT2C$langchaintextsplitters = require("@langchain/textsplitters");
|
|
1
|
+
var $8JZgm$jsonata = require("jsonata");
|
|
2
|
+
var $8JZgm$lodash = require("lodash");
|
|
3
|
+
var $8JZgm$mixmarkiodomino = require("@mixmark-io/domino");
|
|
4
|
+
var $8JZgm$turndown = require("turndown");
|
|
5
|
+
var $8JZgm$marked = require("marked");
|
|
6
|
+
var $8JZgm$json2md = require("json2md");
|
|
7
|
+
var $8JZgm$luxon = require("luxon");
|
|
8
|
+
var $8JZgm$pmap = require("p-map");
|
|
9
|
+
var $8JZgm$pretry = require("p-retry");
|
|
10
|
+
var $8JZgm$mime = require("mime");
|
|
11
|
+
var $8JZgm$xmljs = require("xml-js");
|
|
12
|
+
var $8JZgm$dicecoefficient = require("dice-coefficient");
|
|
13
|
+
var $8JZgm$qs = require("qs");
|
|
14
|
+
var $8JZgm$langchaintextsplitters = require("@langchain/textsplitters");
|
|
16
15
|
|
|
17
16
|
function $parcel$interopDefault(a) {
|
|
18
17
|
return a && a.__esModule ? a.default : a;
|
|
@@ -26,10 +25,10 @@ function $parcel$export(e, n, v, s) {
|
|
|
26
25
|
|
|
27
26
|
$parcel$defineInteropFlag(module.exports);
|
|
28
27
|
|
|
29
|
-
$parcel$export(module.exports, "default", () => $
|
|
28
|
+
$parcel$export(module.exports, "default", () => $bda2bff6fd99c84f$export$2e2bcd8739ae039);
|
|
30
29
|
|
|
31
30
|
|
|
32
|
-
function $
|
|
31
|
+
function $0e491578bc1ae22a$var$base64decode(base64, urlSafe = false) {
|
|
33
32
|
if (urlSafe) base64 = base64.replace(/-/g, "+").replace(/_/g, "/");
|
|
34
33
|
const binary = atob(base64);
|
|
35
34
|
const len = binary.length;
|
|
@@ -37,10 +36,10 @@ function $77081a2d6d46cd50$var$base64decode(base64, urlSafe = false) {
|
|
|
37
36
|
for(let i = 0; i < len; i++)bytes[i] = binary.charCodeAt(i);
|
|
38
37
|
return new TextDecoder().decode(bytes);
|
|
39
38
|
}
|
|
40
|
-
var $
|
|
39
|
+
var $0e491578bc1ae22a$export$2e2bcd8739ae039 = $0e491578bc1ae22a$var$base64decode;
|
|
41
40
|
|
|
42
41
|
|
|
43
|
-
function $
|
|
42
|
+
function $8d03c5df5e0a89ca$var$base64encode(input, urlSafe = false) {
|
|
44
43
|
let binary = "";
|
|
45
44
|
const bytes = new TextEncoder().encode(input);
|
|
46
45
|
const len = bytes.length;
|
|
@@ -49,10 +48,10 @@ function $1b5edce2fe329e3e$var$base64encode(input, urlSafe = false) {
|
|
|
49
48
|
if (urlSafe) base64 = base64.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
50
49
|
return base64;
|
|
51
50
|
}
|
|
52
|
-
var $
|
|
51
|
+
var $8d03c5df5e0a89ca$export$2e2bcd8739ae039 = $8d03c5df5e0a89ca$var$base64encode;
|
|
53
52
|
|
|
54
53
|
|
|
55
|
-
function $
|
|
54
|
+
function $8893c1da97a40f3f$var$base64ToBlob(base64, options = {}) {
|
|
56
55
|
const { mimeType: mimeType = "application/octet-stream" , urlSafe: urlSafe = false } = options;
|
|
57
56
|
if (!base64 || typeof base64 !== "string") return new Blob([], {
|
|
58
57
|
type: mimeType
|
|
@@ -86,17 +85,17 @@ function $0183648cc15cbf3c$var$base64ToBlob(base64, options = {}) {
|
|
|
86
85
|
throw new Error(`Invalid base64 string: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
87
86
|
}
|
|
88
87
|
}
|
|
89
|
-
var $
|
|
88
|
+
var $8893c1da97a40f3f$export$2e2bcd8739ae039 = $8893c1da97a40f3f$var$base64ToBlob;
|
|
90
89
|
|
|
91
90
|
|
|
92
91
|
|
|
93
|
-
function $
|
|
94
|
-
return new Blob((0, $
|
|
92
|
+
function $2d72eb3f05b5e1e5$var$blob(content, options) {
|
|
93
|
+
return new Blob((0, $8JZgm$lodash.castArray)(content || ""), options);
|
|
95
94
|
}
|
|
96
|
-
var $
|
|
95
|
+
var $2d72eb3f05b5e1e5$export$2e2bcd8739ae039 = $2d72eb3f05b5e1e5$var$blob;
|
|
97
96
|
|
|
98
97
|
|
|
99
|
-
async function $
|
|
98
|
+
async function $218d624cd15398df$var$bufferToString(value, encoding) {
|
|
100
99
|
if (value instanceof ReadableStream) {
|
|
101
100
|
const chunks = [];
|
|
102
101
|
for await (const chunk of value)chunks.push(Buffer.from(chunk));
|
|
@@ -105,74 +104,268 @@ async function $0f748d6318103cdf$var$bufferToString(value, encoding) {
|
|
|
105
104
|
}
|
|
106
105
|
return value.toString(encoding);
|
|
107
106
|
}
|
|
108
|
-
var $
|
|
107
|
+
var $218d624cd15398df$export$2e2bcd8739ae039 = $218d624cd15398df$var$bufferToString;
|
|
109
108
|
|
|
110
109
|
|
|
111
110
|
|
|
112
|
-
var $
|
|
113
|
-
$ca838bf406ad8d65$exports = JSON.parse('{"AED":{"code":"AED","number":"784","digits":2,"currency":"UAE Dirham","countries":["United Arab Emirates (The)"]},"AFN":{"code":"AFN","number":"971","digits":2,"currency":"Afghani","countries":["Afghanistan"]},"ALL":{"code":"ALL","number":"008","digits":2,"currency":"Lek","countries":["Albania"]},"AMD":{"code":"AMD","number":"051","digits":2,"currency":"Armenian Dram","countries":["Armenia"]},"ANG":{"code":"ANG","number":"532","digits":2,"currency":"Netherlands Antillean Guilder","countries":["Cura\xe7ao","Sint Maarten (Dutch Part)"]},"AOA":{"code":"AOA","number":"973","digits":2,"currency":"Kwanza","countries":["Angola"]},"ARS":{"code":"ARS","number":"032","digits":2,"currency":"Argentine Peso","countries":["Argentina"]},"AUD":{"code":"AUD","number":"036","digits":2,"currency":"Australian Dollar","countries":["Australia","Christmas Island","Cocos (Keeling) Islands (The)","Heard Island and Mcdonald Islands","Kiribati","Nauru","Norfolk Island","Tuvalu"]},"AWG":{"code":"AWG","number":"533","digits":2,"currency":"Aruban Florin","countries":["Aruba"]},"AZN":{"code":"AZN","number":"944","digits":2,"currency":"Azerbaijan Manat","countries":["Azerbaijan"]},"BAM":{"code":"BAM","number":"977","digits":2,"currency":"Convertible Mark","countries":["Bosnia and Herzegovina"]},"BBD":{"code":"BBD","number":"052","digits":2,"currency":"Barbados Dollar","countries":["Barbados"]},"BDT":{"code":"BDT","number":"050","digits":2,"currency":"Taka","countries":["Bangladesh"]},"BGN":{"code":"BGN","number":"975","digits":2,"currency":"Bulgarian Lev","countries":["Bulgaria"]},"BHD":{"code":"BHD","number":"048","digits":3,"currency":"Bahraini Dinar","countries":["Bahrain"]},"BIF":{"code":"BIF","number":"108","digits":0,"currency":"Burundi Franc","countries":["Burundi"]},"BMD":{"code":"BMD","number":"060","digits":2,"currency":"Bermudian Dollar","countries":["Bermuda"]},"BND":{"code":"BND","number":"096","digits":2,"currency":"Brunei Dollar","countries":["Brunei Darussalam"]},"BOB":{"code":"BOB","number":"068","digits":2,"currency":"Boliviano","countries":["Bolivia (Plurinational State Of)"]},"BOV":{"code":"BOV","number":"984","digits":2,"currency":"Mvdol","countries":["Bolivia (Plurinational State Of)"]},"BRL":{"code":"BRL","number":"986","digits":2,"currency":"Brazilian Real","countries":["Brazil"]},"BSD":{"code":"BSD","number":"044","digits":2,"currency":"Bahamian Dollar","countries":["Bahamas (The)"]},"BTN":{"code":"BTN","number":"064","digits":2,"currency":"Ngultrum","countries":["Bhutan"]},"BWP":{"code":"BWP","number":"072","digits":2,"currency":"Pula","countries":["Botswana"]},"BYN":{"code":"BYN","number":"933","digits":2,"currency":"Belarusian Ruble","countries":["Belarus"]},"BZD":{"code":"BZD","number":"084","digits":2,"currency":"Belize Dollar","countries":["Belize"]},"CAD":{"code":"CAD","number":"124","digits":2,"currency":"Canadian Dollar","countries":["Canada"]},"CDF":{"code":"CDF","number":"976","digits":2,"currency":"Congolese Franc","countries":["Congo (The Democratic Republic of The)"]},"CHE":{"code":"CHE","number":"947","digits":2,"currency":"WIR Euro","countries":["Switzerland"]},"CHF":{"code":"CHF","number":"756","digits":2,"currency":"Swiss Franc","countries":["Liechtenstein","Switzerland"]},"CHW":{"code":"CHW","number":"948","digits":2,"currency":"WIR Franc","countries":["Switzerland"]},"CLF":{"code":"CLF","number":"990","digits":4,"currency":"Unidad de Fomento","countries":["Chile"]},"CLP":{"code":"CLP","number":"152","digits":0,"currency":"Chilean Peso","countries":["Chile"]},"CNY":{"code":"CNY","number":"156","digits":2,"currency":"Yuan Renminbi","countries":["China"]},"COP":{"code":"COP","number":"170","digits":2,"currency":"Colombian Peso","countries":["Colombia"]},"COU":{"code":"COU","number":"970","digits":2,"currency":"Unidad de Valor Real","countries":["Colombia"]},"CRC":{"code":"CRC","number":"188","digits":2,"currency":"Costa Rican Colon","countries":["Costa Rica"]},"CUC":{"code":"CUC","number":"931","digits":2,"currency":"Peso Convertible","countries":["Cuba"]},"CUP":{"code":"CUP","number":"192","digits":2,"currency":"Cuban Peso","countries":["Cuba"]},"CVE":{"code":"CVE","number":"132","digits":2,"currency":"Cabo Verde Escudo","countries":["Cabo Verde"]},"CZK":{"code":"CZK","number":"203","digits":2,"currency":"Czech Koruna","countries":["Czechia"]},"DJF":{"code":"DJF","number":"262","digits":0,"currency":"Djibouti Franc","countries":["Djibouti"]},"DKK":{"code":"DKK","number":"208","digits":2,"currency":"Danish Krone","countries":["Denmark","Faroe Islands (The)","Greenland"]},"DOP":{"code":"DOP","number":"214","digits":2,"currency":"Dominican Peso","countries":["Dominican Republic (The)"]},"DZD":{"code":"DZD","number":"012","digits":2,"currency":"Algerian Dinar","countries":["Algeria"]},"EGP":{"code":"EGP","number":"818","digits":2,"currency":"Egyptian Pound","countries":["Egypt"]},"ERN":{"code":"ERN","number":"232","digits":2,"currency":"Nakfa","countries":["Eritrea"]},"ETB":{"code":"ETB","number":"230","digits":2,"currency":"Ethiopian Birr","countries":["Ethiopia"]},"EUR":{"code":"EUR","number":"978","digits":2,"currency":"Euro","countries":["\xc5land Islands","Andorra","Austria","Belgium","Cyprus","Estonia","European Union","Finland","France","French Guiana","French Southern Territories (The)","Germany","Greece","Guadeloupe","Holy See (The)","Ireland","Italy","Latvia","Lithuania","Luxembourg","Malta","Martinique","Mayotte","Monaco","Montenegro","Netherlands (The)","Portugal","R\xe9union","Saint Barth\xe9lemy","Saint Martin (French Part)","Saint Pierre and Miquelon","San Marino","Slovakia","Slovenia","Spain"]},"FJD":{"code":"FJD","number":"242","digits":2,"currency":"Fiji Dollar","countries":["Fiji"]},"FKP":{"code":"FKP","number":"238","digits":2,"currency":"Falkland Islands Pound","countries":["Falkland Islands (The) [Malvinas]"]},"GBP":{"code":"GBP","number":"826","digits":2,"currency":"Pound Sterling","countries":["Guernsey","Isle of Man","Jersey","United Kingdom of Great Britain and Northern Ireland (The)"]},"GEL":{"code":"GEL","number":"981","digits":2,"currency":"Lari","countries":["Georgia"]},"GHS":{"code":"GHS","number":"936","digits":2,"currency":"Ghana Cedi","countries":["Ghana"]},"GIP":{"code":"GIP","number":"292","digits":2,"currency":"Gibraltar Pound","countries":["Gibraltar"]},"GMD":{"code":"GMD","number":"270","digits":2,"currency":"Dalasi","countries":["Gambia (The)"]},"GNF":{"code":"GNF","number":"324","digits":0,"currency":"Guinean Franc","countries":["Guinea"]},"GTQ":{"code":"GTQ","number":"320","digits":2,"currency":"Quetzal","countries":["Guatemala"]},"GYD":{"code":"GYD","number":"328","digits":2,"currency":"Guyana Dollar","countries":["Guyana"]},"HKD":{"code":"HKD","number":"344","digits":2,"currency":"Hong Kong Dollar","countries":["Hong Kong"]},"HNL":{"code":"HNL","number":"340","digits":2,"currency":"Lempira","countries":["Honduras"]},"HRK":{"code":"HRK","number":"191","digits":2,"currency":"Kuna","countries":["Croatia"]},"HTG":{"code":"HTG","number":"332","digits":2,"currency":"Gourde","countries":["Haiti"]},"HUF":{"code":"HUF","number":"348","digits":2,"currency":"Forint","countries":["Hungary"]},"IDR":{"code":"IDR","number":"360","digits":2,"currency":"Rupiah","countries":["Indonesia"]},"ILS":{"code":"ILS","number":"376","digits":2,"currency":"New Israeli Sheqel","countries":["Israel"]},"INR":{"code":"INR","number":"356","digits":2,"currency":"Indian Rupee","countries":["Bhutan","India"]},"IQD":{"code":"IQD","number":"368","digits":3,"currency":"Iraqi Dinar","countries":["Iraq"]},"IRR":{"code":"IRR","number":"364","digits":2,"currency":"Iranian Rial","countries":["Iran (Islamic Republic Of)"]},"ISK":{"code":"ISK","number":"352","digits":0,"currency":"Iceland Krona","countries":["Iceland"]},"JMD":{"code":"JMD","number":"388","digits":2,"currency":"Jamaican Dollar","countries":["Jamaica"]},"JOD":{"code":"JOD","number":"400","digits":3,"currency":"Jordanian Dinar","countries":["Jordan"]},"JPY":{"code":"JPY","number":"392","digits":0,"currency":"Yen","countries":["Japan"]},"KES":{"code":"KES","number":"404","digits":2,"currency":"Kenyan Shilling","countries":["Kenya"]},"KGS":{"code":"KGS","number":"417","digits":2,"currency":"Som","countries":["Kyrgyzstan"]},"KHR":{"code":"KHR","number":"116","digits":2,"currency":"Riel","countries":["Cambodia"]},"KMF":{"code":"KMF","number":"174","digits":0,"currency":"Comorian Franc ","countries":["Comoros (The)"]},"KPW":{"code":"KPW","number":"408","digits":2,"currency":"North Korean Won","countries":["Korea (The Democratic People’s Republic Of)"]},"KRW":{"code":"KRW","number":"410","digits":0,"currency":"Won","countries":["Korea (The Republic Of)"]},"KWD":{"code":"KWD","number":"414","digits":3,"currency":"Kuwaiti Dinar","countries":["Kuwait"]},"KYD":{"code":"KYD","number":"136","digits":2,"currency":"Cayman Islands Dollar","countries":["Cayman Islands (The)"]},"KZT":{"code":"KZT","number":"398","digits":2,"currency":"Tenge","countries":["Kazakhstan"]},"LAK":{"code":"LAK","number":"418","digits":2,"currency":"Lao Kip","countries":["Lao People’s Democratic Republic (The)"]},"LBP":{"code":"LBP","number":"422","digits":2,"currency":"Lebanese Pound","countries":["Lebanon"]},"LKR":{"code":"LKR","number":"144","digits":2,"currency":"Sri Lanka Rupee","countries":["Sri Lanka"]},"LRD":{"code":"LRD","number":"430","digits":2,"currency":"Liberian Dollar","countries":["Liberia"]},"LSL":{"code":"LSL","number":"426","digits":2,"currency":"Loti","countries":["Lesotho"]},"LYD":{"code":"LYD","number":"434","digits":3,"currency":"Libyan Dinar","countries":["Libya"]},"MAD":{"code":"MAD","number":"504","digits":2,"currency":"Moroccan Dirham","countries":["Morocco","Western Sahara"]},"MDL":{"code":"MDL","number":"498","digits":2,"currency":"Moldovan Leu","countries":["Moldova (The Republic Of)"]},"MGA":{"code":"MGA","number":"969","digits":2,"currency":"Malagasy Ariary","countries":["Madagascar"]},"MKD":{"code":"MKD","number":"807","digits":2,"currency":"Denar","countries":["Macedonia (The Former Yugoslav Republic Of)"]},"MMK":{"code":"MMK","number":"104","digits":2,"currency":"Kyat","countries":["Myanmar"]},"MNT":{"code":"MNT","number":"496","digits":2,"currency":"Tugrik","countries":["Mongolia"]},"MOP":{"code":"MOP","number":"446","digits":2,"currency":"Pataca","countries":["Macao"]},"MRU":{"code":"MRU","number":"929","digits":2,"currency":"Ouguiya","countries":["Mauritania"]},"MUR":{"code":"MUR","number":"480","digits":2,"currency":"Mauritius Rupee","countries":["Mauritius"]},"MVR":{"code":"MVR","number":"462","digits":2,"currency":"Rufiyaa","countries":["Maldives"]},"MWK":{"code":"MWK","number":"454","digits":2,"currency":"Malawi Kwacha","countries":["Malawi"]},"MXN":{"code":"MXN","number":"484","digits":2,"currency":"Mexican Peso","countries":["Mexico"]},"MXV":{"code":"MXV","number":"979","digits":2,"currency":"Mexican Unidad de Inversion (UDI)","countries":["Mexico"]},"MYR":{"code":"MYR","number":"458","digits":2,"currency":"Malaysian Ringgit","countries":["Malaysia"]},"MZN":{"code":"MZN","number":"943","digits":2,"currency":"Mozambique Metical","countries":["Mozambique"]},"NAD":{"code":"NAD","number":"516","digits":2,"currency":"Namibia Dollar","countries":["Namibia"]},"NGN":{"code":"NGN","number":"566","digits":2,"currency":"Naira","countries":["Nigeria"]},"NIO":{"code":"NIO","number":"558","digits":2,"currency":"Cordoba Oro","countries":["Nicaragua"]},"NOK":{"code":"NOK","number":"578","digits":2,"currency":"Norwegian Krone","countries":["Bouvet Island","Norway","Svalbard and Jan Mayen"]},"NPR":{"code":"NPR","number":"524","digits":2,"currency":"Nepalese Rupee","countries":["Nepal"]},"NZD":{"code":"NZD","number":"554","digits":2,"currency":"New Zealand Dollar","countries":["Cook Islands (The)","New Zealand","Niue","Pitcairn","Tokelau"]},"OMR":{"code":"OMR","number":"512","digits":3,"currency":"Rial Omani","countries":["Oman"]},"PAB":{"code":"PAB","number":"590","digits":2,"currency":"Balboa","countries":["Panama"]},"PEN":{"code":"PEN","number":"604","digits":2,"currency":"Sol","countries":["Peru"]},"PGK":{"code":"PGK","number":"598","digits":2,"currency":"Kina","countries":["Papua New Guinea"]},"PHP":{"code":"PHP","number":"608","digits":2,"currency":"Philippine Peso","countries":["Philippines (The)"]},"PKR":{"code":"PKR","number":"586","digits":2,"currency":"Pakistan Rupee","countries":["Pakistan"]},"PLN":{"code":"PLN","number":"985","digits":2,"currency":"Zloty","countries":["Poland"]},"PYG":{"code":"PYG","number":"600","digits":0,"currency":"Guarani","countries":["Paraguay"]},"QAR":{"code":"QAR","number":"634","digits":2,"currency":"Qatari Rial","countries":["Qatar"]},"RON":{"code":"RON","number":"946","digits":2,"currency":"Romanian Leu","countries":["Romania"]},"RSD":{"code":"RSD","number":"941","digits":2,"currency":"Serbian Dinar","countries":["Serbia"]},"RUB":{"code":"RUB","number":"643","digits":2,"currency":"Russian Ruble","countries":["Russian Federation (The)"]},"RWF":{"code":"RWF","number":"646","digits":0,"currency":"Rwanda Franc","countries":["Rwanda"]},"SAR":{"code":"SAR","number":"682","digits":2,"currency":"Saudi Riyal","countries":["Saudi Arabia"]},"SBD":{"code":"SBD","number":"090","digits":2,"currency":"Solomon Islands Dollar","countries":["Solomon Islands"]},"SCR":{"code":"SCR","number":"690","digits":2,"currency":"Seychelles Rupee","countries":["Seychelles"]},"SDG":{"code":"SDG","number":"938","digits":2,"currency":"Sudanese Pound","countries":["Sudan (The)"]},"SEK":{"code":"SEK","number":"752","digits":2,"currency":"Swedish Krona","countries":["Sweden"]},"SGD":{"code":"SGD","number":"702","digits":2,"currency":"Singapore Dollar","countries":["Singapore"]},"SHP":{"code":"SHP","number":"654","digits":2,"currency":"Saint Helena Pound","countries":["Saint Helena, Ascension and Tristan Da Cunha"]},"SLL":{"code":"SLL","number":"694","digits":2,"currency":"Leone","countries":["Sierra Leone"]},"SOS":{"code":"SOS","number":"706","digits":2,"currency":"Somali Shilling","countries":["Somalia"]},"SRD":{"code":"SRD","number":"968","digits":2,"currency":"Surinam Dollar","countries":["Suriname"]},"SSP":{"code":"SSP","number":"728","digits":2,"currency":"South Sudanese Pound","countries":["South Sudan"]},"STN":{"code":"STN","number":"930","digits":2,"currency":"Dobra","countries":["Sao Tome and Principe"]},"SVC":{"code":"SVC","number":"222","digits":2,"currency":"El Salvador Colon","countries":["El Salvador"]},"SYP":{"code":"SYP","number":"760","digits":2,"currency":"Syrian Pound","countries":["Syrian Arab Republic"]},"SZL":{"code":"SZL","number":"748","digits":2,"currency":"Lilangeni","countries":["Eswatini"]},"THB":{"code":"THB","number":"764","digits":2,"currency":"Baht","countries":["Thailand"]},"TJS":{"code":"TJS","number":"972","digits":2,"currency":"Somoni","countries":["Tajikistan"]},"TMT":{"code":"TMT","number":"934","digits":2,"currency":"Turkmenistan New Manat","countries":["Turkmenistan"]},"TND":{"code":"TND","number":"788","digits":3,"currency":"Tunisian Dinar","countries":["Tunisia"]},"TOP":{"code":"TOP","number":"776","digits":2,"currency":"Pa’anga","countries":["Tonga"]},"TRY":{"code":"TRY","number":"949","digits":2,"currency":"Turkish Lira","countries":["Turkey"]},"TTD":{"code":"TTD","number":"780","digits":2,"currency":"Trinidad and Tobago Dollar","countries":["Trinidad and Tobago"]},"TWD":{"code":"TWD","number":"901","digits":2,"currency":"New Taiwan Dollar","countries":["Taiwan (Province of China)"]},"TZS":{"code":"TZS","number":"834","digits":2,"currency":"Tanzanian Shilling","countries":["Tanzania, United Republic Of"]},"UAH":{"code":"UAH","number":"980","digits":2,"currency":"Hryvnia","countries":["Ukraine"]},"UGX":{"code":"UGX","number":"800","digits":0,"currency":"Uganda Shilling","countries":["Uganda"]},"USD":{"code":"USD","number":"840","digits":2,"currency":"US Dollar","countries":["American Samoa","Bonaire, Sint Eustatius and Saba","British Indian Ocean Territory (The)","Ecuador","El Salvador","Guam","Haiti","Marshall Islands (The)","Micronesia (Federated States Of)","Northern Mariana Islands (The)","Palau","Panama","Puerto Rico","Timor-Leste","Turks and Caicos Islands (The)","United States Minor Outlying Islands (The)","United States of America (The)","Virgin Islands (British)","Virgin Islands (U.S.)"]},"USN":{"code":"USN","number":"997","digits":2,"currency":"US Dollar (Next day)","countries":["United States of America (The)"]},"UYI":{"code":"UYI","number":"940","digits":0,"currency":"Uruguay Peso en Unidades Indexadas (UI)","countries":["Uruguay"]},"UYU":{"code":"UYU","number":"858","digits":2,"currency":"Peso Uruguayo","countries":["Uruguay"]},"UYW":{"code":"UYW","number":"927","digits":4,"currency":"Unidad Previsional","countries":["Uruguay"]},"UZS":{"code":"UZS","number":"860","digits":2,"currency":"Uzbekistan Sum","countries":["Uzbekistan"]},"VES":{"code":"VES","number":"928","digits":2,"currency":"Bol\xedvar Soberano","countries":["Venezuela (Bolivarian Republic Of)"]},"VND":{"code":"VND","number":"704","digits":0,"currency":"Dong","countries":["Viet Nam"]},"VUV":{"code":"VUV","number":"548","digits":0,"currency":"Vatu","countries":["Vanuatu"]},"WST":{"code":"WST","number":"882","digits":2,"currency":"Tala","countries":["Samoa"]},"XAF":{"code":"XAF","number":"950","digits":0,"currency":"CFA Franc BEAC","countries":["Cameroon","Central African Republic (The)","Chad","Congo (The)","Equatorial Guinea","Gabon"]},"XAG":{"code":"XAG","number":"961","digits":0,"currency":"Silver","countries":["Zz11_silver"]},"XAU":{"code":"XAU","number":"959","digits":0,"currency":"Gold","countries":["Zz08_gold"]},"XBA":{"code":"XBA","number":"955","digits":0,"currency":"Bond Markets Unit European Composite Unit (EURCO)","countries":["Zz01_bond Markets Unit European_eurco"]},"XBB":{"code":"XBB","number":"956","digits":0,"currency":"Bond Markets Unit European Monetary Unit (E.M.U.-6)","countries":["Zz02_bond Markets Unit European_emu-6"]},"XBC":{"code":"XBC","number":"957","digits":0,"currency":"Bond Markets Unit European Unit of Account 9 (E.U.A.-9)","countries":["Zz03_bond Markets Unit European_eua-9"]},"XBD":{"code":"XBD","number":"958","digits":0,"currency":"Bond Markets Unit European Unit of Account 17 (E.U.A.-17)","countries":["Zz04_bond Markets Unit European_eua-17"]},"XCD":{"code":"XCD","number":"951","digits":2,"currency":"East Caribbean Dollar","countries":["Anguilla","Antigua and Barbuda","Dominica","Grenada","Montserrat","Saint Kitts and Nevis","Saint Lucia","Saint Vincent and the Grenadines"]},"XDR":{"code":"XDR","number":"960","digits":0,"currency":"SDR (Special Drawing Right)","countries":["International Monetary Fund (Imf) "]},"XOF":{"code":"XOF","number":"952","digits":0,"currency":"CFA Franc BCEAO","countries":["Benin","Burkina Faso","C\xf4te d\'Ivoire","Guinea-Bissau","Mali","Niger (The)","Senegal","Togo"]},"XPD":{"code":"XPD","number":"964","digits":0,"currency":"Palladium","countries":["Zz09_palladium"]},"XPF":{"code":"XPF","number":"953","digits":0,"currency":"CFP Franc","countries":["French Polynesia","New Caledonia","Wallis and Futuna"]},"XPT":{"code":"XPT","number":"962","digits":0,"currency":"Platinum","countries":["Zz10_platinum"]},"XSU":{"code":"XSU","number":"994","digits":0,"currency":"Sucre","countries":["Sistema Unitario De Compensacion Regional De Pagos"]},"XTS":{"code":"XTS","number":"963","digits":0,"currency":"Codes specifically reserved for testing purposes","countries":["Zz06_testing_code"]},"XUA":{"code":"XUA","number":"965","digits":0,"currency":"ADB Unit of Account","countries":["Member Countries of the African Development Bank Group"]},"XXX":{"code":"XXX","number":"999","digits":0,"currency":"The codes assigned for transactions where no currency is involved","countries":["Zz07_no_currency"]},"YER":{"code":"YER","number":"886","digits":2,"currency":"Yemeni Rial","countries":["Yemen"]},"ZAR":{"code":"ZAR","number":"710","digits":2,"currency":"Rand","countries":["Lesotho","Namibia","South Africa"]},"ZMW":{"code":"ZMW","number":"967","digits":2,"currency":"Zambian Kwacha","countries":["Zambia"]},"ZWL":{"code":"ZWL","number":"932","digits":2,"currency":"Zimbabwe Dollar","countries":["Zimbabwe"]}}');
|
|
111
|
+
var $94459f531e09cb01$exports = {};
|
|
112
|
+
$94459f531e09cb01$exports = JSON.parse('{"AED":{"code":"AED","number":"784","digits":2,"currency":"UAE Dirham","countries":["United Arab Emirates (The)"]},"AFN":{"code":"AFN","number":"971","digits":2,"currency":"Afghani","countries":["Afghanistan"]},"ALL":{"code":"ALL","number":"008","digits":2,"currency":"Lek","countries":["Albania"]},"AMD":{"code":"AMD","number":"051","digits":2,"currency":"Armenian Dram","countries":["Armenia"]},"ANG":{"code":"ANG","number":"532","digits":2,"currency":"Netherlands Antillean Guilder","countries":["Cura\xe7ao","Sint Maarten (Dutch Part)"]},"AOA":{"code":"AOA","number":"973","digits":2,"currency":"Kwanza","countries":["Angola"]},"ARS":{"code":"ARS","number":"032","digits":2,"currency":"Argentine Peso","countries":["Argentina"]},"AUD":{"code":"AUD","number":"036","digits":2,"currency":"Australian Dollar","countries":["Australia","Christmas Island","Cocos (Keeling) Islands (The)","Heard Island and Mcdonald Islands","Kiribati","Nauru","Norfolk Island","Tuvalu"]},"AWG":{"code":"AWG","number":"533","digits":2,"currency":"Aruban Florin","countries":["Aruba"]},"AZN":{"code":"AZN","number":"944","digits":2,"currency":"Azerbaijan Manat","countries":["Azerbaijan"]},"BAM":{"code":"BAM","number":"977","digits":2,"currency":"Convertible Mark","countries":["Bosnia and Herzegovina"]},"BBD":{"code":"BBD","number":"052","digits":2,"currency":"Barbados Dollar","countries":["Barbados"]},"BDT":{"code":"BDT","number":"050","digits":2,"currency":"Taka","countries":["Bangladesh"]},"BGN":{"code":"BGN","number":"975","digits":2,"currency":"Bulgarian Lev","countries":["Bulgaria"]},"BHD":{"code":"BHD","number":"048","digits":3,"currency":"Bahraini Dinar","countries":["Bahrain"]},"BIF":{"code":"BIF","number":"108","digits":0,"currency":"Burundi Franc","countries":["Burundi"]},"BMD":{"code":"BMD","number":"060","digits":2,"currency":"Bermudian Dollar","countries":["Bermuda"]},"BND":{"code":"BND","number":"096","digits":2,"currency":"Brunei Dollar","countries":["Brunei Darussalam"]},"BOB":{"code":"BOB","number":"068","digits":2,"currency":"Boliviano","countries":["Bolivia (Plurinational State Of)"]},"BOV":{"code":"BOV","number":"984","digits":2,"currency":"Mvdol","countries":["Bolivia (Plurinational State Of)"]},"BRL":{"code":"BRL","number":"986","digits":2,"currency":"Brazilian Real","countries":["Brazil"]},"BSD":{"code":"BSD","number":"044","digits":2,"currency":"Bahamian Dollar","countries":["Bahamas (The)"]},"BTN":{"code":"BTN","number":"064","digits":2,"currency":"Ngultrum","countries":["Bhutan"]},"BWP":{"code":"BWP","number":"072","digits":2,"currency":"Pula","countries":["Botswana"]},"BYN":{"code":"BYN","number":"933","digits":2,"currency":"Belarusian Ruble","countries":["Belarus"]},"BZD":{"code":"BZD","number":"084","digits":2,"currency":"Belize Dollar","countries":["Belize"]},"CAD":{"code":"CAD","number":"124","digits":2,"currency":"Canadian Dollar","countries":["Canada"]},"CDF":{"code":"CDF","number":"976","digits":2,"currency":"Congolese Franc","countries":["Congo (The Democratic Republic of The)"]},"CHE":{"code":"CHE","number":"947","digits":2,"currency":"WIR Euro","countries":["Switzerland"]},"CHF":{"code":"CHF","number":"756","digits":2,"currency":"Swiss Franc","countries":["Liechtenstein","Switzerland"]},"CHW":{"code":"CHW","number":"948","digits":2,"currency":"WIR Franc","countries":["Switzerland"]},"CLF":{"code":"CLF","number":"990","digits":4,"currency":"Unidad de Fomento","countries":["Chile"]},"CLP":{"code":"CLP","number":"152","digits":0,"currency":"Chilean Peso","countries":["Chile"]},"CNY":{"code":"CNY","number":"156","digits":2,"currency":"Yuan Renminbi","countries":["China"]},"COP":{"code":"COP","number":"170","digits":2,"currency":"Colombian Peso","countries":["Colombia"]},"COU":{"code":"COU","number":"970","digits":2,"currency":"Unidad de Valor Real","countries":["Colombia"]},"CRC":{"code":"CRC","number":"188","digits":2,"currency":"Costa Rican Colon","countries":["Costa Rica"]},"CUC":{"code":"CUC","number":"931","digits":2,"currency":"Peso Convertible","countries":["Cuba"]},"CUP":{"code":"CUP","number":"192","digits":2,"currency":"Cuban Peso","countries":["Cuba"]},"CVE":{"code":"CVE","number":"132","digits":2,"currency":"Cabo Verde Escudo","countries":["Cabo Verde"]},"CZK":{"code":"CZK","number":"203","digits":2,"currency":"Czech Koruna","countries":["Czechia"]},"DJF":{"code":"DJF","number":"262","digits":0,"currency":"Djibouti Franc","countries":["Djibouti"]},"DKK":{"code":"DKK","number":"208","digits":2,"currency":"Danish Krone","countries":["Denmark","Faroe Islands (The)","Greenland"]},"DOP":{"code":"DOP","number":"214","digits":2,"currency":"Dominican Peso","countries":["Dominican Republic (The)"]},"DZD":{"code":"DZD","number":"012","digits":2,"currency":"Algerian Dinar","countries":["Algeria"]},"EGP":{"code":"EGP","number":"818","digits":2,"currency":"Egyptian Pound","countries":["Egypt"]},"ERN":{"code":"ERN","number":"232","digits":2,"currency":"Nakfa","countries":["Eritrea"]},"ETB":{"code":"ETB","number":"230","digits":2,"currency":"Ethiopian Birr","countries":["Ethiopia"]},"EUR":{"code":"EUR","number":"978","digits":2,"currency":"Euro","countries":["\xc5land Islands","Andorra","Austria","Belgium","Cyprus","Estonia","European Union","Finland","France","French Guiana","French Southern Territories (The)","Germany","Greece","Guadeloupe","Holy See (The)","Ireland","Italy","Latvia","Lithuania","Luxembourg","Malta","Martinique","Mayotte","Monaco","Montenegro","Netherlands (The)","Portugal","R\xe9union","Saint Barth\xe9lemy","Saint Martin (French Part)","Saint Pierre and Miquelon","San Marino","Slovakia","Slovenia","Spain"]},"FJD":{"code":"FJD","number":"242","digits":2,"currency":"Fiji Dollar","countries":["Fiji"]},"FKP":{"code":"FKP","number":"238","digits":2,"currency":"Falkland Islands Pound","countries":["Falkland Islands (The) [Malvinas]"]},"GBP":{"code":"GBP","number":"826","digits":2,"currency":"Pound Sterling","countries":["Guernsey","Isle of Man","Jersey","United Kingdom of Great Britain and Northern Ireland (The)"]},"GEL":{"code":"GEL","number":"981","digits":2,"currency":"Lari","countries":["Georgia"]},"GHS":{"code":"GHS","number":"936","digits":2,"currency":"Ghana Cedi","countries":["Ghana"]},"GIP":{"code":"GIP","number":"292","digits":2,"currency":"Gibraltar Pound","countries":["Gibraltar"]},"GMD":{"code":"GMD","number":"270","digits":2,"currency":"Dalasi","countries":["Gambia (The)"]},"GNF":{"code":"GNF","number":"324","digits":0,"currency":"Guinean Franc","countries":["Guinea"]},"GTQ":{"code":"GTQ","number":"320","digits":2,"currency":"Quetzal","countries":["Guatemala"]},"GYD":{"code":"GYD","number":"328","digits":2,"currency":"Guyana Dollar","countries":["Guyana"]},"HKD":{"code":"HKD","number":"344","digits":2,"currency":"Hong Kong Dollar","countries":["Hong Kong"]},"HNL":{"code":"HNL","number":"340","digits":2,"currency":"Lempira","countries":["Honduras"]},"HRK":{"code":"HRK","number":"191","digits":2,"currency":"Kuna","countries":["Croatia"]},"HTG":{"code":"HTG","number":"332","digits":2,"currency":"Gourde","countries":["Haiti"]},"HUF":{"code":"HUF","number":"348","digits":2,"currency":"Forint","countries":["Hungary"]},"IDR":{"code":"IDR","number":"360","digits":2,"currency":"Rupiah","countries":["Indonesia"]},"ILS":{"code":"ILS","number":"376","digits":2,"currency":"New Israeli Sheqel","countries":["Israel"]},"INR":{"code":"INR","number":"356","digits":2,"currency":"Indian Rupee","countries":["Bhutan","India"]},"IQD":{"code":"IQD","number":"368","digits":3,"currency":"Iraqi Dinar","countries":["Iraq"]},"IRR":{"code":"IRR","number":"364","digits":2,"currency":"Iranian Rial","countries":["Iran (Islamic Republic Of)"]},"ISK":{"code":"ISK","number":"352","digits":0,"currency":"Iceland Krona","countries":["Iceland"]},"JMD":{"code":"JMD","number":"388","digits":2,"currency":"Jamaican Dollar","countries":["Jamaica"]},"JOD":{"code":"JOD","number":"400","digits":3,"currency":"Jordanian Dinar","countries":["Jordan"]},"JPY":{"code":"JPY","number":"392","digits":0,"currency":"Yen","countries":["Japan"]},"KES":{"code":"KES","number":"404","digits":2,"currency":"Kenyan Shilling","countries":["Kenya"]},"KGS":{"code":"KGS","number":"417","digits":2,"currency":"Som","countries":["Kyrgyzstan"]},"KHR":{"code":"KHR","number":"116","digits":2,"currency":"Riel","countries":["Cambodia"]},"KMF":{"code":"KMF","number":"174","digits":0,"currency":"Comorian Franc ","countries":["Comoros (The)"]},"KPW":{"code":"KPW","number":"408","digits":2,"currency":"North Korean Won","countries":["Korea (The Democratic People’s Republic Of)"]},"KRW":{"code":"KRW","number":"410","digits":0,"currency":"Won","countries":["Korea (The Republic Of)"]},"KWD":{"code":"KWD","number":"414","digits":3,"currency":"Kuwaiti Dinar","countries":["Kuwait"]},"KYD":{"code":"KYD","number":"136","digits":2,"currency":"Cayman Islands Dollar","countries":["Cayman Islands (The)"]},"KZT":{"code":"KZT","number":"398","digits":2,"currency":"Tenge","countries":["Kazakhstan"]},"LAK":{"code":"LAK","number":"418","digits":2,"currency":"Lao Kip","countries":["Lao People’s Democratic Republic (The)"]},"LBP":{"code":"LBP","number":"422","digits":2,"currency":"Lebanese Pound","countries":["Lebanon"]},"LKR":{"code":"LKR","number":"144","digits":2,"currency":"Sri Lanka Rupee","countries":["Sri Lanka"]},"LRD":{"code":"LRD","number":"430","digits":2,"currency":"Liberian Dollar","countries":["Liberia"]},"LSL":{"code":"LSL","number":"426","digits":2,"currency":"Loti","countries":["Lesotho"]},"LYD":{"code":"LYD","number":"434","digits":3,"currency":"Libyan Dinar","countries":["Libya"]},"MAD":{"code":"MAD","number":"504","digits":2,"currency":"Moroccan Dirham","countries":["Morocco","Western Sahara"]},"MDL":{"code":"MDL","number":"498","digits":2,"currency":"Moldovan Leu","countries":["Moldova (The Republic Of)"]},"MGA":{"code":"MGA","number":"969","digits":2,"currency":"Malagasy Ariary","countries":["Madagascar"]},"MKD":{"code":"MKD","number":"807","digits":2,"currency":"Denar","countries":["Macedonia (The Former Yugoslav Republic Of)"]},"MMK":{"code":"MMK","number":"104","digits":2,"currency":"Kyat","countries":["Myanmar"]},"MNT":{"code":"MNT","number":"496","digits":2,"currency":"Tugrik","countries":["Mongolia"]},"MOP":{"code":"MOP","number":"446","digits":2,"currency":"Pataca","countries":["Macao"]},"MRU":{"code":"MRU","number":"929","digits":2,"currency":"Ouguiya","countries":["Mauritania"]},"MUR":{"code":"MUR","number":"480","digits":2,"currency":"Mauritius Rupee","countries":["Mauritius"]},"MVR":{"code":"MVR","number":"462","digits":2,"currency":"Rufiyaa","countries":["Maldives"]},"MWK":{"code":"MWK","number":"454","digits":2,"currency":"Malawi Kwacha","countries":["Malawi"]},"MXN":{"code":"MXN","number":"484","digits":2,"currency":"Mexican Peso","countries":["Mexico"]},"MXV":{"code":"MXV","number":"979","digits":2,"currency":"Mexican Unidad de Inversion (UDI)","countries":["Mexico"]},"MYR":{"code":"MYR","number":"458","digits":2,"currency":"Malaysian Ringgit","countries":["Malaysia"]},"MZN":{"code":"MZN","number":"943","digits":2,"currency":"Mozambique Metical","countries":["Mozambique"]},"NAD":{"code":"NAD","number":"516","digits":2,"currency":"Namibia Dollar","countries":["Namibia"]},"NGN":{"code":"NGN","number":"566","digits":2,"currency":"Naira","countries":["Nigeria"]},"NIO":{"code":"NIO","number":"558","digits":2,"currency":"Cordoba Oro","countries":["Nicaragua"]},"NOK":{"code":"NOK","number":"578","digits":2,"currency":"Norwegian Krone","countries":["Bouvet Island","Norway","Svalbard and Jan Mayen"]},"NPR":{"code":"NPR","number":"524","digits":2,"currency":"Nepalese Rupee","countries":["Nepal"]},"NZD":{"code":"NZD","number":"554","digits":2,"currency":"New Zealand Dollar","countries":["Cook Islands (The)","New Zealand","Niue","Pitcairn","Tokelau"]},"OMR":{"code":"OMR","number":"512","digits":3,"currency":"Rial Omani","countries":["Oman"]},"PAB":{"code":"PAB","number":"590","digits":2,"currency":"Balboa","countries":["Panama"]},"PEN":{"code":"PEN","number":"604","digits":2,"currency":"Sol","countries":["Peru"]},"PGK":{"code":"PGK","number":"598","digits":2,"currency":"Kina","countries":["Papua New Guinea"]},"PHP":{"code":"PHP","number":"608","digits":2,"currency":"Philippine Peso","countries":["Philippines (The)"]},"PKR":{"code":"PKR","number":"586","digits":2,"currency":"Pakistan Rupee","countries":["Pakistan"]},"PLN":{"code":"PLN","number":"985","digits":2,"currency":"Zloty","countries":["Poland"]},"PYG":{"code":"PYG","number":"600","digits":0,"currency":"Guarani","countries":["Paraguay"]},"QAR":{"code":"QAR","number":"634","digits":2,"currency":"Qatari Rial","countries":["Qatar"]},"RON":{"code":"RON","number":"946","digits":2,"currency":"Romanian Leu","countries":["Romania"]},"RSD":{"code":"RSD","number":"941","digits":2,"currency":"Serbian Dinar","countries":["Serbia"]},"RUB":{"code":"RUB","number":"643","digits":2,"currency":"Russian Ruble","countries":["Russian Federation (The)"]},"RWF":{"code":"RWF","number":"646","digits":0,"currency":"Rwanda Franc","countries":["Rwanda"]},"SAR":{"code":"SAR","number":"682","digits":2,"currency":"Saudi Riyal","countries":["Saudi Arabia"]},"SBD":{"code":"SBD","number":"090","digits":2,"currency":"Solomon Islands Dollar","countries":["Solomon Islands"]},"SCR":{"code":"SCR","number":"690","digits":2,"currency":"Seychelles Rupee","countries":["Seychelles"]},"SDG":{"code":"SDG","number":"938","digits":2,"currency":"Sudanese Pound","countries":["Sudan (The)"]},"SEK":{"code":"SEK","number":"752","digits":2,"currency":"Swedish Krona","countries":["Sweden"]},"SGD":{"code":"SGD","number":"702","digits":2,"currency":"Singapore Dollar","countries":["Singapore"]},"SHP":{"code":"SHP","number":"654","digits":2,"currency":"Saint Helena Pound","countries":["Saint Helena, Ascension and Tristan Da Cunha"]},"SLL":{"code":"SLL","number":"694","digits":2,"currency":"Leone","countries":["Sierra Leone"]},"SOS":{"code":"SOS","number":"706","digits":2,"currency":"Somali Shilling","countries":["Somalia"]},"SRD":{"code":"SRD","number":"968","digits":2,"currency":"Surinam Dollar","countries":["Suriname"]},"SSP":{"code":"SSP","number":"728","digits":2,"currency":"South Sudanese Pound","countries":["South Sudan"]},"STN":{"code":"STN","number":"930","digits":2,"currency":"Dobra","countries":["Sao Tome and Principe"]},"SVC":{"code":"SVC","number":"222","digits":2,"currency":"El Salvador Colon","countries":["El Salvador"]},"SYP":{"code":"SYP","number":"760","digits":2,"currency":"Syrian Pound","countries":["Syrian Arab Republic"]},"SZL":{"code":"SZL","number":"748","digits":2,"currency":"Lilangeni","countries":["Eswatini"]},"THB":{"code":"THB","number":"764","digits":2,"currency":"Baht","countries":["Thailand"]},"TJS":{"code":"TJS","number":"972","digits":2,"currency":"Somoni","countries":["Tajikistan"]},"TMT":{"code":"TMT","number":"934","digits":2,"currency":"Turkmenistan New Manat","countries":["Turkmenistan"]},"TND":{"code":"TND","number":"788","digits":3,"currency":"Tunisian Dinar","countries":["Tunisia"]},"TOP":{"code":"TOP","number":"776","digits":2,"currency":"Pa’anga","countries":["Tonga"]},"TRY":{"code":"TRY","number":"949","digits":2,"currency":"Turkish Lira","countries":["Turkey"]},"TTD":{"code":"TTD","number":"780","digits":2,"currency":"Trinidad and Tobago Dollar","countries":["Trinidad and Tobago"]},"TWD":{"code":"TWD","number":"901","digits":2,"currency":"New Taiwan Dollar","countries":["Taiwan (Province of China)"]},"TZS":{"code":"TZS","number":"834","digits":2,"currency":"Tanzanian Shilling","countries":["Tanzania, United Republic Of"]},"UAH":{"code":"UAH","number":"980","digits":2,"currency":"Hryvnia","countries":["Ukraine"]},"UGX":{"code":"UGX","number":"800","digits":0,"currency":"Uganda Shilling","countries":["Uganda"]},"USD":{"code":"USD","number":"840","digits":2,"currency":"US Dollar","countries":["American Samoa","Bonaire, Sint Eustatius and Saba","British Indian Ocean Territory (The)","Ecuador","El Salvador","Guam","Haiti","Marshall Islands (The)","Micronesia (Federated States Of)","Northern Mariana Islands (The)","Palau","Panama","Puerto Rico","Timor-Leste","Turks and Caicos Islands (The)","United States Minor Outlying Islands (The)","United States of America (The)","Virgin Islands (British)","Virgin Islands (U.S.)"]},"USN":{"code":"USN","number":"997","digits":2,"currency":"US Dollar (Next day)","countries":["United States of America (The)"]},"UYI":{"code":"UYI","number":"940","digits":0,"currency":"Uruguay Peso en Unidades Indexadas (UI)","countries":["Uruguay"]},"UYU":{"code":"UYU","number":"858","digits":2,"currency":"Peso Uruguayo","countries":["Uruguay"]},"UYW":{"code":"UYW","number":"927","digits":4,"currency":"Unidad Previsional","countries":["Uruguay"]},"UZS":{"code":"UZS","number":"860","digits":2,"currency":"Uzbekistan Sum","countries":["Uzbekistan"]},"VES":{"code":"VES","number":"928","digits":2,"currency":"Bol\xedvar Soberano","countries":["Venezuela (Bolivarian Republic Of)"]},"VND":{"code":"VND","number":"704","digits":0,"currency":"Dong","countries":["Viet Nam"]},"VUV":{"code":"VUV","number":"548","digits":0,"currency":"Vatu","countries":["Vanuatu"]},"WST":{"code":"WST","number":"882","digits":2,"currency":"Tala","countries":["Samoa"]},"XAF":{"code":"XAF","number":"950","digits":0,"currency":"CFA Franc BEAC","countries":["Cameroon","Central African Republic (The)","Chad","Congo (The)","Equatorial Guinea","Gabon"]},"XAG":{"code":"XAG","number":"961","digits":0,"currency":"Silver","countries":["Zz11_silver"]},"XAU":{"code":"XAU","number":"959","digits":0,"currency":"Gold","countries":["Zz08_gold"]},"XBA":{"code":"XBA","number":"955","digits":0,"currency":"Bond Markets Unit European Composite Unit (EURCO)","countries":["Zz01_bond Markets Unit European_eurco"]},"XBB":{"code":"XBB","number":"956","digits":0,"currency":"Bond Markets Unit European Monetary Unit (E.M.U.-6)","countries":["Zz02_bond Markets Unit European_emu-6"]},"XBC":{"code":"XBC","number":"957","digits":0,"currency":"Bond Markets Unit European Unit of Account 9 (E.U.A.-9)","countries":["Zz03_bond Markets Unit European_eua-9"]},"XBD":{"code":"XBD","number":"958","digits":0,"currency":"Bond Markets Unit European Unit of Account 17 (E.U.A.-17)","countries":["Zz04_bond Markets Unit European_eua-17"]},"XCD":{"code":"XCD","number":"951","digits":2,"currency":"East Caribbean Dollar","countries":["Anguilla","Antigua and Barbuda","Dominica","Grenada","Montserrat","Saint Kitts and Nevis","Saint Lucia","Saint Vincent and the Grenadines"]},"XDR":{"code":"XDR","number":"960","digits":0,"currency":"SDR (Special Drawing Right)","countries":["International Monetary Fund (Imf) "]},"XOF":{"code":"XOF","number":"952","digits":0,"currency":"CFA Franc BCEAO","countries":["Benin","Burkina Faso","C\xf4te d\'Ivoire","Guinea-Bissau","Mali","Niger (The)","Senegal","Togo"]},"XPD":{"code":"XPD","number":"964","digits":0,"currency":"Palladium","countries":["Zz09_palladium"]},"XPF":{"code":"XPF","number":"953","digits":0,"currency":"CFP Franc","countries":["French Polynesia","New Caledonia","Wallis and Futuna"]},"XPT":{"code":"XPT","number":"962","digits":0,"currency":"Platinum","countries":["Zz10_platinum"]},"XSU":{"code":"XSU","number":"994","digits":0,"currency":"Sucre","countries":["Sistema Unitario De Compensacion Regional De Pagos"]},"XTS":{"code":"XTS","number":"963","digits":0,"currency":"Codes specifically reserved for testing purposes","countries":["Zz06_testing_code"]},"XUA":{"code":"XUA","number":"965","digits":0,"currency":"ADB Unit of Account","countries":["Member Countries of the African Development Bank Group"]},"XXX":{"code":"XXX","number":"999","digits":0,"currency":"The codes assigned for transactions where no currency is involved","countries":["Zz07_no_currency"]},"YER":{"code":"YER","number":"886","digits":2,"currency":"Yemeni Rial","countries":["Yemen"]},"ZAR":{"code":"ZAR","number":"710","digits":2,"currency":"Rand","countries":["Lesotho","Namibia","South Africa"]},"ZMW":{"code":"ZMW","number":"967","digits":2,"currency":"Zambian Kwacha","countries":["Zambia"]},"ZWL":{"code":"ZWL","number":"932","digits":2,"currency":"Zimbabwe Dollar","countries":["Zimbabwe"]}}');
|
|
114
113
|
|
|
115
114
|
|
|
116
|
-
function $
|
|
117
|
-
if ((0, $
|
|
115
|
+
function $aefb52ddb83a7a81$var$convertCurrencyFromSubunit(arg, currencyCode) {
|
|
116
|
+
if ((0, $8JZgm$lodash.isNil)(arg)) return arg;
|
|
118
117
|
// @ts-ignore
|
|
119
|
-
if ((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
118
|
+
if ((0, (/*@__PURE__*/$parcel$interopDefault($94459f531e09cb01$exports)))[currencyCode]) {
|
|
120
119
|
const amount = parseFloat(arg);
|
|
121
120
|
// @ts-ignore
|
|
122
|
-
const subunit = (0, (/*@__PURE__*/$parcel$interopDefault($
|
|
121
|
+
const subunit = (0, (/*@__PURE__*/$parcel$interopDefault($94459f531e09cb01$exports)))[currencyCode].digits;
|
|
123
122
|
return (amount / Math.pow(10, subunit)).toFixed(subunit);
|
|
124
123
|
}
|
|
125
124
|
return arg;
|
|
126
125
|
}
|
|
127
|
-
var $
|
|
126
|
+
var $aefb52ddb83a7a81$export$2e2bcd8739ae039 = $aefb52ddb83a7a81$var$convertCurrencyFromSubunit;
|
|
128
127
|
|
|
129
128
|
|
|
130
129
|
|
|
131
130
|
|
|
132
|
-
function $
|
|
133
|
-
if ((0, $
|
|
131
|
+
function $121dda924db9fd19$var$convertCurrencyToSubunit(arg, currencyCode) {
|
|
132
|
+
if ((0, $8JZgm$lodash.isNil)(arg)) return arg;
|
|
134
133
|
// @ts-ignore
|
|
135
|
-
if ((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
134
|
+
if ((0, (/*@__PURE__*/$parcel$interopDefault($94459f531e09cb01$exports)))[currencyCode]) {
|
|
136
135
|
const amount = parseFloat(arg);
|
|
137
136
|
// @ts-ignore
|
|
138
|
-
const subunit = (0, (/*@__PURE__*/$parcel$interopDefault($
|
|
137
|
+
const subunit = (0, (/*@__PURE__*/$parcel$interopDefault($94459f531e09cb01$exports)))[currencyCode].digits;
|
|
139
138
|
return Math.floor(amount * Math.pow(10, subunit));
|
|
140
139
|
}
|
|
141
140
|
return arg;
|
|
142
141
|
}
|
|
143
|
-
var $
|
|
142
|
+
var $121dda924db9fd19$export$2e2bcd8739ae039 = $121dda924db9fd19$var$convertCurrencyToSubunit;
|
|
144
143
|
|
|
145
144
|
|
|
146
145
|
// @ts-ignore
|
|
147
146
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
147
|
+
var $e097920682cf8954$var$highlightRegExp = /highlight-(?:(?:text|source)-)?([a-z0-9]+)/;
|
|
148
|
+
function $e097920682cf8954$export$c359330ed80b1889(turndownService) {
|
|
149
|
+
turndownService.addRule("highlightedCodeBlock", {
|
|
150
|
+
filter: function(node) {
|
|
151
|
+
var firstChild = node.firstChild;
|
|
152
|
+
return node.nodeName === "DIV" && $e097920682cf8954$var$highlightRegExp.test(node.className) && firstChild && firstChild.nodeName === "PRE";
|
|
153
|
+
},
|
|
154
|
+
replacement: function(content, node, options) {
|
|
155
|
+
var className = node.className || "";
|
|
156
|
+
var language = (className.match($e097920682cf8954$var$highlightRegExp) || [
|
|
157
|
+
null,
|
|
158
|
+
""
|
|
159
|
+
])[1];
|
|
160
|
+
return "\n\n" + options.fence + language + "\n" + node.firstChild.textContent + "\n" + options.fence + "\n\n";
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
function $e097920682cf8954$export$19426ff118fe8be(turndownService) {
|
|
165
|
+
turndownService.addRule("strikethrough", {
|
|
166
|
+
filter: [
|
|
167
|
+
"del",
|
|
168
|
+
"s",
|
|
169
|
+
"strike"
|
|
170
|
+
],
|
|
171
|
+
replacement: function(content) {
|
|
172
|
+
return "~~" + content + "~~";
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
var $e097920682cf8954$var$rules = {};
|
|
177
|
+
function $e097920682cf8954$var$cleanCellContent(content) {
|
|
178
|
+
if (!content) return " ";
|
|
179
|
+
let cleaned = content.trim().replace(/\s+/g, " ").replace(/\|/g, "\\|").replace(/\\/g, "\\\\").replace(/\n+/g, " ").replace(/\r+/g, " ");
|
|
180
|
+
if (!cleaned || cleaned.match(/^\s*$/)) return " ";
|
|
181
|
+
if (cleaned.length < 3) cleaned += " ".repeat(3 - cleaned.length);
|
|
182
|
+
return cleaned;
|
|
183
|
+
}
|
|
184
|
+
function $e097920682cf8954$var$cell(content, node, index) {
|
|
185
|
+
if (index === null && node && node.parentNode) index = Array.prototype.indexOf.call(node.parentNode.childNodes, node);
|
|
186
|
+
if (index === null) index = 0;
|
|
187
|
+
var prefix = " ";
|
|
188
|
+
if (index === 0) prefix = "| ";
|
|
189
|
+
let cellContent = $e097920682cf8954$var$cleanCellContent(content);
|
|
190
|
+
let colspan = 1;
|
|
191
|
+
if (node && node.getAttribute) {
|
|
192
|
+
colspan = parseInt(node.getAttribute("colspan") || "1", 10);
|
|
193
|
+
if (isNaN(colspan) || colspan < 1) colspan = 1;
|
|
194
|
+
}
|
|
195
|
+
let result = prefix + cellContent + " |";
|
|
196
|
+
for(let i = 1; i < colspan; i++)result += " |";
|
|
197
|
+
return result;
|
|
198
|
+
}
|
|
199
|
+
function $e097920682cf8954$var$isHeadingRow(tr) {
|
|
200
|
+
if (!tr || !tr.parentNode) return false;
|
|
201
|
+
var parentNode = tr.parentNode;
|
|
202
|
+
if (parentNode.nodeName === "THEAD") return true;
|
|
203
|
+
if (parentNode.firstChild === tr && (parentNode.nodeName === "TABLE" || parentNode.nodeName === "TBODY")) {
|
|
204
|
+
var cellNodes = Array.prototype.filter.call(tr.childNodes, function(n) {
|
|
205
|
+
return n.nodeType === 1;
|
|
206
|
+
});
|
|
207
|
+
if (cellNodes.length === 0) return false;
|
|
208
|
+
return Array.prototype.every.call(cellNodes, function(n) {
|
|
209
|
+
return n.nodeName === "TH";
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
return false;
|
|
213
|
+
}
|
|
214
|
+
function $e097920682cf8954$var$getTableColCount(table) {
|
|
215
|
+
if (!table || !table.rows) return 0;
|
|
216
|
+
let maxCols = 0;
|
|
217
|
+
for(let i = 0; i < table.rows.length; i++){
|
|
218
|
+
const row = table.rows[i];
|
|
219
|
+
if (!row || !row.childNodes) continue;
|
|
220
|
+
let colCount = 0;
|
|
221
|
+
for(let j = 0; j < row.childNodes.length; j++){
|
|
222
|
+
const cell2 = row.childNodes[j];
|
|
223
|
+
if (cell2.nodeType === 1 && (cell2.nodeName === "TD" || cell2.nodeName === "TH")) {
|
|
224
|
+
const colspan = parseInt(cell2.getAttribute("colspan") || "1", 10);
|
|
225
|
+
colCount += isNaN(colspan) ? 1 : Math.max(1, colspan);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
if (colCount > maxCols) maxCols = colCount;
|
|
229
|
+
}
|
|
230
|
+
return maxCols;
|
|
231
|
+
}
|
|
232
|
+
function $e097920682cf8954$var$shouldSkipTable(table) {
|
|
233
|
+
if (!table) return true;
|
|
234
|
+
if (!table.rows || table.rows.length === 0) return true;
|
|
235
|
+
let contentCells = 0;
|
|
236
|
+
let totalCells = 0;
|
|
237
|
+
for(let i = 0; i < table.rows.length; i++){
|
|
238
|
+
const row = table.rows[i];
|
|
239
|
+
if (!row || !row.childNodes) continue;
|
|
240
|
+
for(let j = 0; j < row.childNodes.length; j++){
|
|
241
|
+
const cell2 = row.childNodes[j];
|
|
242
|
+
if (cell2.nodeType === 1 && (cell2.nodeName === "TD" || cell2.nodeName === "TH")) {
|
|
243
|
+
totalCells++;
|
|
244
|
+
if (cell2.textContent && cell2.textContent.trim()) contentCells++;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
if (totalCells === 0) return true;
|
|
249
|
+
if (totalCells === 1 && contentCells === 0) return true;
|
|
250
|
+
return false;
|
|
251
|
+
}
|
|
252
|
+
$e097920682cf8954$var$rules.tableCell = {
|
|
253
|
+
filter: [
|
|
254
|
+
"th",
|
|
255
|
+
"td"
|
|
256
|
+
],
|
|
257
|
+
replacement: function(content, node) {
|
|
258
|
+
return $e097920682cf8954$var$cell(content, node, null);
|
|
259
|
+
}
|
|
155
260
|
};
|
|
156
|
-
|
|
261
|
+
$e097920682cf8954$var$rules.tableRow = {
|
|
262
|
+
filter: "tr",
|
|
263
|
+
replacement: function(content, node) {
|
|
264
|
+
if (!content || !content.trim()) return "";
|
|
265
|
+
var borderCells = "";
|
|
266
|
+
if ($e097920682cf8954$var$isHeadingRow(node)) {
|
|
267
|
+
const table = node.closest("table");
|
|
268
|
+
if (table) {
|
|
269
|
+
const colCount = $e097920682cf8954$var$getTableColCount(table);
|
|
270
|
+
if (colCount > 0) for(var i = 0; i < colCount; i++){
|
|
271
|
+
const prefix = i === 0 ? "| " : " ";
|
|
272
|
+
borderCells += prefix + "--- |";
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
return "\n" + content + (borderCells ? "\n" + borderCells : "");
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
$e097920682cf8954$var$rules.table = {
|
|
280
|
+
filter: "table",
|
|
281
|
+
replacement: function(content, node) {
|
|
282
|
+
if ($e097920682cf8954$var$shouldSkipTable(node)) return "";
|
|
283
|
+
content = content.replace(/\n+/g, "\n").trim();
|
|
284
|
+
if (!content) return "";
|
|
285
|
+
const lines = content.split("\n").filter((line)=>line.trim());
|
|
286
|
+
if (lines.length === 0) return "";
|
|
287
|
+
const hasHeaderSeparator = lines.length >= 2 && /\|\s*-+/.test(lines[1]);
|
|
288
|
+
let result = lines.join("\n");
|
|
289
|
+
if (!hasHeaderSeparator && lines.length >= 1) {
|
|
290
|
+
const firstLine = lines[0];
|
|
291
|
+
const colCount = (firstLine.match(/\|/g) || []).length - 1;
|
|
292
|
+
if (colCount > 0) {
|
|
293
|
+
let separator = "|";
|
|
294
|
+
for(let i = 0; i < colCount; i++)separator += " --- |";
|
|
295
|
+
const resultLines = [
|
|
296
|
+
lines[0],
|
|
297
|
+
separator,
|
|
298
|
+
...lines.slice(1)
|
|
299
|
+
];
|
|
300
|
+
result = resultLines.join("\n");
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
return "\n\n" + result + "\n\n";
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
$e097920682cf8954$var$rules.tableSection = {
|
|
307
|
+
filter: [
|
|
308
|
+
"thead",
|
|
309
|
+
"tbody",
|
|
310
|
+
"tfoot"
|
|
311
|
+
],
|
|
312
|
+
replacement: function(content) {
|
|
313
|
+
return content;
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
$e097920682cf8954$var$rules.tableCaption = {
|
|
317
|
+
filter: [
|
|
318
|
+
"caption"
|
|
319
|
+
],
|
|
320
|
+
replacement: function() {
|
|
321
|
+
return "";
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
$e097920682cf8954$var$rules.tableColgroup = {
|
|
325
|
+
filter: [
|
|
326
|
+
"colgroup",
|
|
327
|
+
"col"
|
|
328
|
+
],
|
|
329
|
+
replacement: function() {
|
|
330
|
+
return "";
|
|
331
|
+
}
|
|
332
|
+
};
|
|
333
|
+
function $e097920682cf8954$export$cc4ff83fc7bd256e(turndownService) {
|
|
334
|
+
for(var key in $e097920682cf8954$var$rules)turndownService.addRule(key, $e097920682cf8954$var$rules[key]);
|
|
335
|
+
}
|
|
336
|
+
function $e097920682cf8954$export$1f0c2747e2ba0b8d(turndownService) {
|
|
337
|
+
turndownService.addRule("taskListItems", {
|
|
338
|
+
filter: function(node) {
|
|
339
|
+
return node.type === "checkbox" && node.parentNode.nodeName === "LI";
|
|
340
|
+
},
|
|
341
|
+
replacement: function(content, node) {
|
|
342
|
+
return (node.checked ? "[x]" : "[ ]") + " ";
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
function $e097920682cf8954$export$2e2bcd8739ae039(turndownService) {
|
|
347
|
+
turndownService.use([
|
|
348
|
+
$e097920682cf8954$export$c359330ed80b1889,
|
|
349
|
+
$e097920682cf8954$export$19426ff118fe8be,
|
|
350
|
+
$e097920682cf8954$export$cc4ff83fc7bd256e,
|
|
351
|
+
$e097920682cf8954$export$1f0c2747e2ba0b8d
|
|
352
|
+
]);
|
|
353
|
+
}
|
|
157
354
|
|
|
158
355
|
|
|
159
356
|
|
|
357
|
+
const $609a3a0e109e1552$var$convertHtmlToMarkdown = (html)=>{
|
|
358
|
+
const htmlDoc = (0, $8JZgm$mixmarkiodomino.createDocument)(html);
|
|
359
|
+
const turndownService = new (0, ($parcel$interopDefault($8JZgm$turndown)))();
|
|
360
|
+
turndownService.use((0, $e097920682cf8954$export$2e2bcd8739ae039));
|
|
361
|
+
return turndownService.turndown(htmlDoc);
|
|
362
|
+
};
|
|
363
|
+
var $609a3a0e109e1552$export$2e2bcd8739ae039 = $609a3a0e109e1552$var$convertHtmlToMarkdown;
|
|
160
364
|
|
|
161
365
|
|
|
162
|
-
const $233848446ca33fe6$var$insertBetween = (arr, value)=>{
|
|
163
|
-
return (0, $dxT2C$lodashes.flatMap)(arr, (item, index)=>{
|
|
164
|
-
return index === arr.length - 1 ? [
|
|
165
|
-
item
|
|
166
|
-
] : [
|
|
167
|
-
item,
|
|
168
|
-
...(0, $dxT2C$lodashes.castArray)(value)
|
|
169
|
-
];
|
|
170
|
-
});
|
|
171
|
-
};
|
|
172
|
-
var $233848446ca33fe6$export$2e2bcd8739ae039 = $233848446ca33fe6$var$insertBetween;
|
|
173
366
|
|
|
174
367
|
|
|
175
|
-
function $
|
|
368
|
+
function $1fb4a66b7688f326$var$decodeHtmlEntities(encodedString) {
|
|
176
369
|
const htmlEntities = {
|
|
177
370
|
"&": "&",
|
|
178
371
|
"<": "<",
|
|
@@ -186,10 +379,24 @@ function $5a7cb266718aeaae$var$decodeHtmlEntities(encodedString) {
|
|
|
186
379
|
};
|
|
187
380
|
return encodedString.replace(/&|<|>|"|'|/|\|`|=/g, (match)=>htmlEntities[match]);
|
|
188
381
|
}
|
|
189
|
-
var $
|
|
382
|
+
var $1fb4a66b7688f326$export$2e2bcd8739ae039 = $1fb4a66b7688f326$var$decodeHtmlEntities;
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
const $922685c71ec4de2b$var$insertBetween = (arr, value)=>{
|
|
387
|
+
return (0, $8JZgm$lodash.flatMap)(arr, (item, index)=>{
|
|
388
|
+
return index === arr.length - 1 ? [
|
|
389
|
+
item
|
|
390
|
+
] : [
|
|
391
|
+
item,
|
|
392
|
+
...(0, $8JZgm$lodash.castArray)(value)
|
|
393
|
+
];
|
|
394
|
+
});
|
|
395
|
+
};
|
|
396
|
+
var $922685c71ec4de2b$export$2e2bcd8739ae039 = $922685c71ec4de2b$var$insertBetween;
|
|
190
397
|
|
|
191
398
|
|
|
192
|
-
const $
|
|
399
|
+
const $62a670ce81736b3d$var$parseMarkedTokenToGoogleDocsRequest = (tokens, acc = {
|
|
193
400
|
counter: 1,
|
|
194
401
|
offset: 0,
|
|
195
402
|
inserts: [],
|
|
@@ -197,7 +404,7 @@ const $90c566adb85cb52e$var$parseMarkedTokenToGoogleDocsRequest = (tokens, acc =
|
|
|
197
404
|
}, context = {
|
|
198
405
|
level: 0
|
|
199
406
|
})=>{
|
|
200
|
-
return (0, $
|
|
407
|
+
return (0, $8JZgm$lodash.reduce)(tokens, (acc, token)=>{
|
|
201
408
|
if (token.type === "hr") {
|
|
202
409
|
acc.inserts.push({
|
|
203
410
|
insertText: {
|
|
@@ -246,12 +453,12 @@ const $90c566adb85cb52e$var$parseMarkedTokenToGoogleDocsRequest = (tokens, acc =
|
|
|
246
453
|
}
|
|
247
454
|
});
|
|
248
455
|
acc.counter += 4;
|
|
249
|
-
(0, $
|
|
456
|
+
(0, $8JZgm$lodash.each)([
|
|
250
457
|
token.header,
|
|
251
458
|
...token.rows
|
|
252
459
|
], (rowItems, index, arr)=>{
|
|
253
|
-
(0, $
|
|
254
|
-
$
|
|
460
|
+
(0, $8JZgm$lodash.each)(rowItems, (item)=>{
|
|
461
|
+
$62a670ce81736b3d$var$parseMarkedTokenToGoogleDocsRequest([
|
|
255
462
|
item
|
|
256
463
|
], acc, context);
|
|
257
464
|
acc.counter += 2;
|
|
@@ -270,8 +477,8 @@ const $90c566adb85cb52e$var$parseMarkedTokenToGoogleDocsRequest = (tokens, acc =
|
|
|
270
477
|
acc.counter += 1;
|
|
271
478
|
return acc;
|
|
272
479
|
}
|
|
273
|
-
const childTokens = (0, $
|
|
274
|
-
if (!(0, $
|
|
480
|
+
const childTokens = (0, $8JZgm$lodash.get)(token, "tokens");
|
|
481
|
+
if (!(0, $8JZgm$lodash.isEmpty)(childTokens)) {
|
|
275
482
|
const start = acc.counter;
|
|
276
483
|
if (token.type === "list_item") {
|
|
277
484
|
if (context.level > 1) {
|
|
@@ -286,13 +493,13 @@ const $90c566adb85cb52e$var$parseMarkedTokenToGoogleDocsRequest = (tokens, acc =
|
|
|
286
493
|
acc.offset += context.level - 1;
|
|
287
494
|
acc.counter += context.level - 1;
|
|
288
495
|
}
|
|
289
|
-
$
|
|
496
|
+
$62a670ce81736b3d$var$parseMarkedTokenToGoogleDocsRequest((0, $922685c71ec4de2b$export$2e2bcd8739ae039)(childTokens, [
|
|
290
497
|
{
|
|
291
498
|
type: "space",
|
|
292
499
|
raw: "\n"
|
|
293
500
|
}
|
|
294
501
|
]), acc, context);
|
|
295
|
-
} else $
|
|
502
|
+
} else $62a670ce81736b3d$var$parseMarkedTokenToGoogleDocsRequest(childTokens, acc, context);
|
|
296
503
|
const end = acc.counter;
|
|
297
504
|
if (token.type === "heading") {
|
|
298
505
|
acc.formats.push({
|
|
@@ -367,10 +574,10 @@ const $90c566adb85cb52e$var$parseMarkedTokenToGoogleDocsRequest = (tokens, acc =
|
|
|
367
574
|
});
|
|
368
575
|
return acc;
|
|
369
576
|
}
|
|
370
|
-
const childItems = (0, $
|
|
371
|
-
if (!(0, $
|
|
577
|
+
const childItems = (0, $8JZgm$lodash.get)(token, "items");
|
|
578
|
+
if (!(0, $8JZgm$lodash.isEmpty)(childItems)) {
|
|
372
579
|
const start = acc.counter;
|
|
373
|
-
$
|
|
580
|
+
$62a670ce81736b3d$var$parseMarkedTokenToGoogleDocsRequest((0, $922685c71ec4de2b$export$2e2bcd8739ae039)(childItems, [
|
|
374
581
|
{
|
|
375
582
|
type: "space",
|
|
376
583
|
raw: "\n"
|
|
@@ -379,7 +586,7 @@ const $90c566adb85cb52e$var$parseMarkedTokenToGoogleDocsRequest = (tokens, acc =
|
|
|
379
586
|
level: context.level + 1
|
|
380
587
|
});
|
|
381
588
|
const end = acc.counter;
|
|
382
|
-
if (!context.level && token.type === "list") acc.formats = (0, $
|
|
589
|
+
if (!context.level && token.type === "list") acc.formats = (0, $8JZgm$lodash.concat)({
|
|
383
590
|
createParagraphBullets: {
|
|
384
591
|
range: {
|
|
385
592
|
startIndex: start,
|
|
@@ -390,9 +597,9 @@ const $90c566adb85cb52e$var$parseMarkedTokenToGoogleDocsRequest = (tokens, acc =
|
|
|
390
597
|
}, acc.formats);
|
|
391
598
|
return acc;
|
|
392
599
|
}
|
|
393
|
-
const text = (0, $
|
|
600
|
+
const text = (0, $8JZgm$lodash.get)(token, "text");
|
|
394
601
|
if (!text) return acc;
|
|
395
|
-
const textToInsert = (0, $
|
|
602
|
+
const textToInsert = (0, $1fb4a66b7688f326$export$2e2bcd8739ae039)(text);
|
|
396
603
|
acc.inserts.push({
|
|
397
604
|
insertText: {
|
|
398
605
|
text: textToInsert,
|
|
@@ -405,22 +612,22 @@ const $90c566adb85cb52e$var$parseMarkedTokenToGoogleDocsRequest = (tokens, acc =
|
|
|
405
612
|
return acc;
|
|
406
613
|
}, acc);
|
|
407
614
|
};
|
|
408
|
-
const $
|
|
409
|
-
const tokens = (0, $
|
|
410
|
-
const parsedTokens = $
|
|
615
|
+
const $62a670ce81736b3d$var$convertMarkdownToGoogleDocs = (text, currentCounter = 1)=>{
|
|
616
|
+
const tokens = (0, $8JZgm$marked.Lexer).lex(text);
|
|
617
|
+
const parsedTokens = $62a670ce81736b3d$var$parseMarkedTokenToGoogleDocsRequest(tokens, {
|
|
411
618
|
counter: currentCounter,
|
|
412
619
|
formats: [],
|
|
413
620
|
inserts: [],
|
|
414
621
|
offset: 0
|
|
415
622
|
});
|
|
416
623
|
const formats = parsedTokens.formats;
|
|
417
|
-
const mergedFormats = (0, $
|
|
418
|
-
const range = (0, $
|
|
624
|
+
const mergedFormats = (0, $8JZgm$lodash.reduce)(formats, (acc, format)=>{
|
|
625
|
+
const range = (0, $8JZgm$lodash.get)(format, "updateTextStyle.range");
|
|
419
626
|
if (!range) acc.push(format);
|
|
420
627
|
else {
|
|
421
|
-
const existingFormat = (0, $
|
|
422
|
-
const r = (0, $
|
|
423
|
-
return (0, $
|
|
628
|
+
const existingFormat = (0, $8JZgm$lodash.find)(acc, (f)=>{
|
|
629
|
+
const r = (0, $8JZgm$lodash.get)(f, "updateTextStyle.range");
|
|
630
|
+
return (0, $8JZgm$lodash.isEqual)(r, range);
|
|
424
631
|
});
|
|
425
632
|
if (existingFormat) existingFormat.updateTextStyle.textStyle = {
|
|
426
633
|
...existingFormat.updateTextStyle.textStyle,
|
|
@@ -437,25 +644,25 @@ const $90c566adb85cb52e$var$convertMarkdownToGoogleDocs = (text, currentCounter
|
|
|
437
644
|
]
|
|
438
645
|
};
|
|
439
646
|
};
|
|
440
|
-
var $
|
|
647
|
+
var $62a670ce81736b3d$export$2e2bcd8739ae039 = $62a670ce81736b3d$var$convertMarkdownToGoogleDocs;
|
|
441
648
|
|
|
442
649
|
|
|
443
650
|
|
|
444
|
-
async function $
|
|
445
|
-
return (0, $
|
|
651
|
+
async function $7d5587e1c5f3ad11$var$convertMarkdownToHtml(markdown, options) {
|
|
652
|
+
return (0, $8JZgm$marked.marked).parse(markdown, options);
|
|
446
653
|
}
|
|
447
|
-
var $
|
|
654
|
+
var $7d5587e1c5f3ad11$export$2e2bcd8739ae039 = $7d5587e1c5f3ad11$var$convertMarkdownToHtml;
|
|
448
655
|
|
|
449
656
|
|
|
450
657
|
|
|
451
658
|
|
|
452
659
|
|
|
453
660
|
|
|
454
|
-
const $
|
|
455
|
-
return (0, $
|
|
456
|
-
const childTokens = token.type === "blockquote" ? (0, $
|
|
661
|
+
const $8252f21cc2f7f340$var$parseMarkedTokenToNotionRequest = (tokens, acc = [])=>{
|
|
662
|
+
return (0, $8JZgm$lodash.reduce)(tokens, (acc, token)=>{
|
|
663
|
+
const childTokens = token.type === "blockquote" ? (0, $8JZgm$lodash.get)(token, "tokens[0].tokens") : (0, $8JZgm$lodash.get)(token, "tokens");
|
|
457
664
|
let childData = [];
|
|
458
|
-
if (childTokens) childData = $
|
|
665
|
+
if (childTokens) childData = $8252f21cc2f7f340$var$parseMarkedTokenToNotionRequest(childTokens);
|
|
459
666
|
if (token.type === "hr") {
|
|
460
667
|
acc.push({
|
|
461
668
|
type: "divider",
|
|
@@ -492,14 +699,14 @@ const $bc8e7b2fdb012b3a$var$parseMarkedTokenToNotionRequest = (tokens, acc = [])
|
|
|
492
699
|
return acc;
|
|
493
700
|
}
|
|
494
701
|
if (token.type === "paragraph") {
|
|
495
|
-
const groupedChildData = (0, $
|
|
496
|
-
if (!(0, $
|
|
702
|
+
const groupedChildData = (0, $8JZgm$lodash.groupBy)(childData, (x)=>x.type === "image" ? "image" : "other");
|
|
703
|
+
if (!(0, $8JZgm$lodash.isEmpty)(groupedChildData.other)) acc.push({
|
|
497
704
|
type: "paragraph",
|
|
498
705
|
paragraph: {
|
|
499
706
|
rich_text: groupedChildData.other
|
|
500
707
|
}
|
|
501
708
|
});
|
|
502
|
-
if (!(0, $
|
|
709
|
+
if (!(0, $8JZgm$lodash.isEmpty)(groupedChildData.image)) acc = (0, $8JZgm$lodash.concat)(acc, groupedChildData.image);
|
|
503
710
|
return acc;
|
|
504
711
|
}
|
|
505
712
|
if (token.type === "heading") {
|
|
@@ -513,9 +720,9 @@ const $bc8e7b2fdb012b3a$var$parseMarkedTokenToNotionRequest = (tokens, acc = [])
|
|
|
513
720
|
}
|
|
514
721
|
if (token.type === "code") {
|
|
515
722
|
const textSplitByNewLine = token.text.split("\n");
|
|
516
|
-
const chunksOfChunks = (0, $
|
|
517
|
-
const chunksWithNewLines = (0, $
|
|
518
|
-
return (0, $
|
|
723
|
+
const chunksOfChunks = (0, $8JZgm$lodash.compact)((0, $8JZgm$lodash.map)(textSplitByNewLine, (chunk)=>$8252f21cc2f7f340$var$chunkText(chunk)));
|
|
724
|
+
const chunksWithNewLines = (0, $8JZgm$lodash.flattenDeep)((0, $922685c71ec4de2b$export$2e2bcd8739ae039)((0, $8JZgm$lodash.map)(chunksOfChunks, (chunk)=>{
|
|
725
|
+
return (0, $8JZgm$lodash.map)(chunk, (_chunk)=>({
|
|
519
726
|
type: "text",
|
|
520
727
|
text: {
|
|
521
728
|
content: _chunk
|
|
@@ -546,7 +753,7 @@ const $bc8e7b2fdb012b3a$var$parseMarkedTokenToNotionRequest = (tokens, acc = [])
|
|
|
546
753
|
children: []
|
|
547
754
|
}
|
|
548
755
|
};
|
|
549
|
-
const headerChildren = $
|
|
756
|
+
const headerChildren = $8252f21cc2f7f340$var$parseMarkedTokenToNotionRequest(token.header);
|
|
550
757
|
table.table.children.push({
|
|
551
758
|
type: "table_row",
|
|
552
759
|
table_row: {
|
|
@@ -555,8 +762,8 @@ const $bc8e7b2fdb012b3a$var$parseMarkedTokenToNotionRequest = (tokens, acc = [])
|
|
|
555
762
|
])
|
|
556
763
|
}
|
|
557
764
|
});
|
|
558
|
-
(0, $
|
|
559
|
-
const rowChildren = (0, $
|
|
765
|
+
(0, $8JZgm$lodash.each)(token.rows, (row)=>{
|
|
766
|
+
const rowChildren = (0, $8JZgm$lodash.map)(row, (rowCell)=>$8252f21cc2f7f340$var$parseMarkedTokenToNotionRequest([
|
|
560
767
|
rowCell
|
|
561
768
|
]));
|
|
562
769
|
table.table.children.push({
|
|
@@ -571,9 +778,9 @@ const $bc8e7b2fdb012b3a$var$parseMarkedTokenToNotionRequest = (tokens, acc = [])
|
|
|
571
778
|
}
|
|
572
779
|
if (token.type === "list") {
|
|
573
780
|
const listType = token.items[0].task ? "to_do" : token.ordered ? "numbered_list_item" : "bulleted_list_item";
|
|
574
|
-
(0, $
|
|
575
|
-
const itemChildren = $
|
|
576
|
-
const groupedItemChildren = (0, $
|
|
781
|
+
(0, $8JZgm$lodash.each)(token.items, (item)=>{
|
|
782
|
+
const itemChildren = $8252f21cc2f7f340$var$parseMarkedTokenToNotionRequest(item.tokens);
|
|
783
|
+
const groupedItemChildren = (0, $8JZgm$lodash.groupBy)(itemChildren, (x)=>x.type === "text" ? "other" : "list");
|
|
577
784
|
acc.push({
|
|
578
785
|
type: listType,
|
|
579
786
|
[listType]: {
|
|
@@ -587,34 +794,34 @@ const $bc8e7b2fdb012b3a$var$parseMarkedTokenToNotionRequest = (tokens, acc = [])
|
|
|
587
794
|
});
|
|
588
795
|
}
|
|
589
796
|
if (token.type === "em") {
|
|
590
|
-
(0, $
|
|
591
|
-
(0, $
|
|
797
|
+
(0, $8JZgm$lodash.each)(childData, (child)=>{
|
|
798
|
+
(0, $8JZgm$lodash.set)(child, [
|
|
592
799
|
"annotations",
|
|
593
800
|
"italic"
|
|
594
801
|
], true);
|
|
595
802
|
});
|
|
596
|
-
acc = (0, $
|
|
803
|
+
acc = (0, $8JZgm$lodash.concat)(acc, childData);
|
|
597
804
|
return acc;
|
|
598
805
|
}
|
|
599
806
|
if (token.type === "strong") {
|
|
600
|
-
(0, $
|
|
601
|
-
(0, $
|
|
807
|
+
(0, $8JZgm$lodash.each)(childData, (child)=>{
|
|
808
|
+
(0, $8JZgm$lodash.set)(child, [
|
|
602
809
|
"annotations",
|
|
603
810
|
"bold"
|
|
604
811
|
], true);
|
|
605
812
|
});
|
|
606
|
-
acc = (0, $
|
|
813
|
+
acc = (0, $8JZgm$lodash.concat)(acc, childData);
|
|
607
814
|
return acc;
|
|
608
815
|
}
|
|
609
816
|
if (token.type === "link") {
|
|
610
|
-
(0, $
|
|
611
|
-
if (child.text) (0, $
|
|
817
|
+
(0, $8JZgm$lodash.each)(childData, (child)=>{
|
|
818
|
+
if (child.text) (0, $8JZgm$lodash.set)(child, [
|
|
612
819
|
"text",
|
|
613
820
|
"link",
|
|
614
821
|
"url"
|
|
615
822
|
], token.href);
|
|
616
823
|
});
|
|
617
|
-
acc = (0, $
|
|
824
|
+
acc = (0, $8JZgm$lodash.concat)(acc, childData);
|
|
618
825
|
return acc;
|
|
619
826
|
}
|
|
620
827
|
if (token.type === "blockquote") {
|
|
@@ -626,18 +833,18 @@ const $bc8e7b2fdb012b3a$var$parseMarkedTokenToNotionRequest = (tokens, acc = [])
|
|
|
626
833
|
});
|
|
627
834
|
return acc;
|
|
628
835
|
}
|
|
629
|
-
if (!(0, $
|
|
630
|
-
acc = (0, $
|
|
836
|
+
if (!(0, $8JZgm$lodash.isEmpty)(childData)) {
|
|
837
|
+
acc = (0, $8JZgm$lodash.concat)(acc, childData);
|
|
631
838
|
return acc;
|
|
632
839
|
}
|
|
633
|
-
const text = (0, $
|
|
840
|
+
const text = (0, $8JZgm$lodash.get)(token, "text");
|
|
634
841
|
if (!text) return acc;
|
|
635
|
-
const textToInsert = (0, $
|
|
842
|
+
const textToInsert = (0, $1fb4a66b7688f326$export$2e2bcd8739ae039)(text);
|
|
636
843
|
// chunk the text into 2000 character chunks, should handle emojis and multi-byte characters
|
|
637
844
|
const textSplitByNewLine = textToInsert.split("\n");
|
|
638
|
-
const chunksOfChunks = (0, $
|
|
639
|
-
const chunksWithNewLines = (0, $
|
|
640
|
-
return (0, $
|
|
845
|
+
const chunksOfChunks = (0, $8JZgm$lodash.compact)((0, $8JZgm$lodash.map)(textSplitByNewLine, (chunk)=>$8252f21cc2f7f340$var$chunkText(chunk)));
|
|
846
|
+
const chunksWithNewLines = (0, $8JZgm$lodash.flattenDeep)((0, $922685c71ec4de2b$export$2e2bcd8739ae039)((0, $8JZgm$lodash.map)(chunksOfChunks, (chunk)=>{
|
|
847
|
+
return (0, $8JZgm$lodash.map)(chunk, (_chunk)=>({
|
|
641
848
|
type: "text",
|
|
642
849
|
text: {
|
|
643
850
|
content: _chunk
|
|
@@ -654,29 +861,29 @@ const $bc8e7b2fdb012b3a$var$parseMarkedTokenToNotionRequest = (tokens, acc = [])
|
|
|
654
861
|
content: "\n"
|
|
655
862
|
}
|
|
656
863
|
}));
|
|
657
|
-
(0, $
|
|
864
|
+
(0, $8JZgm$lodash.each)(chunksWithNewLines, (chunk)=>{
|
|
658
865
|
acc.push(chunk);
|
|
659
866
|
});
|
|
660
867
|
return acc;
|
|
661
868
|
}, acc);
|
|
662
869
|
};
|
|
663
|
-
const $
|
|
870
|
+
const $8252f21cc2f7f340$var$chunkText = (text, numChars = 2000)=>{
|
|
664
871
|
return text.match(new RegExp(`.{1,${numChars}}`, "g"));
|
|
665
872
|
};
|
|
666
|
-
const $
|
|
667
|
-
const tokens = (0, $
|
|
668
|
-
const parsedTokens = $
|
|
873
|
+
const $8252f21cc2f7f340$var$convertMarkdownToNotion = (text)=>{
|
|
874
|
+
const tokens = (0, $8JZgm$marked.Lexer).lex(text);
|
|
875
|
+
const parsedTokens = $8252f21cc2f7f340$var$parseMarkedTokenToNotionRequest(tokens);
|
|
669
876
|
return {
|
|
670
877
|
children: parsedTokens
|
|
671
878
|
};
|
|
672
879
|
};
|
|
673
|
-
var $
|
|
880
|
+
var $8252f21cc2f7f340$export$2e2bcd8739ae039 = $8252f21cc2f7f340$var$convertMarkdownToNotion;
|
|
674
881
|
|
|
675
882
|
|
|
676
883
|
|
|
677
884
|
|
|
678
|
-
const $
|
|
679
|
-
return (0, $
|
|
885
|
+
const $8d24b15cb35479b5$var$parseMarkedTokenToSlackRequest = (tokens, acc = [])=>{
|
|
886
|
+
return (0, $8JZgm$lodash.reduce)(tokens, (acc, token)=>{
|
|
680
887
|
if (token.type === "hr") {
|
|
681
888
|
acc.push({
|
|
682
889
|
type: "divider"
|
|
@@ -702,22 +909,22 @@ const $15b9b26a1f4728d9$var$parseMarkedTokenToSlackRequest = (tokens, acc = [])=
|
|
|
702
909
|
return acc;
|
|
703
910
|
}
|
|
704
911
|
if (token.type === "paragraph" || token.type === "text") {
|
|
705
|
-
const childTokens = (0, $
|
|
912
|
+
const childTokens = (0, $8JZgm$lodash.get)(token, "tokens");
|
|
706
913
|
let childData = [];
|
|
707
|
-
if (childTokens) childData = $
|
|
914
|
+
if (childTokens) childData = $8d24b15cb35479b5$var$parseMarkedTokenToSlackRequest(childTokens);
|
|
708
915
|
else {
|
|
709
916
|
acc.push(token.raw);
|
|
710
917
|
return acc;
|
|
711
918
|
}
|
|
712
|
-
const childDataGroupedByType = (0, $
|
|
713
|
-
if (!(0, $
|
|
919
|
+
const childDataGroupedByType = (0, $8JZgm$lodash.groupBy)(childData, (x)=>(0, $8JZgm$lodash.isString)(x) ? "text" : "block");
|
|
920
|
+
if (!(0, $8JZgm$lodash.isEmpty)(childDataGroupedByType.text)) acc.push({
|
|
714
921
|
type: "section",
|
|
715
922
|
text: {
|
|
716
923
|
type: "mrkdwn",
|
|
717
|
-
text: (0, $
|
|
924
|
+
text: (0, $8JZgm$lodash.join)(childDataGroupedByType.text, "")
|
|
718
925
|
}
|
|
719
926
|
});
|
|
720
|
-
if (!(0, $
|
|
927
|
+
if (!(0, $8JZgm$lodash.isEmpty)(childDataGroupedByType.block)) acc = (0, $8JZgm$lodash.concat)(acc, childDataGroupedByType.block);
|
|
721
928
|
return acc;
|
|
722
929
|
}
|
|
723
930
|
if (token.type === "heading") {
|
|
@@ -732,13 +939,13 @@ const $15b9b26a1f4728d9$var$parseMarkedTokenToSlackRequest = (tokens, acc = [])=
|
|
|
732
939
|
return acc;
|
|
733
940
|
}
|
|
734
941
|
if (token.type === "list") {
|
|
735
|
-
const items = (0, $
|
|
736
|
-
const childTokens = (0, $
|
|
942
|
+
const items = (0, $8JZgm$lodash.map)(token.items, (item)=>{
|
|
943
|
+
const childTokens = (0, $8JZgm$lodash.get)(item, "tokens");
|
|
737
944
|
let childData = [];
|
|
738
|
-
if (childTokens) childData = $
|
|
945
|
+
if (childTokens) childData = $8d24b15cb35479b5$var$parseMarkedTokenToSlackRequest(childTokens);
|
|
739
946
|
return childData;
|
|
740
947
|
});
|
|
741
|
-
const listString = (0, $
|
|
948
|
+
const listString = (0, $8JZgm$lodash.join)((0, $8JZgm$lodash.filter)((0, $8JZgm$lodash.flattenDeep)(items), (x)=>!!(0, $8JZgm$lodash.get)(x, "text.text")).map((x, index)=>`${token.ordered ? `${index + 1}.` : "•"} ${(0, $8JZgm$lodash.get)(x, "text.text")}`), "\n");
|
|
742
949
|
acc.push({
|
|
743
950
|
type: "section",
|
|
744
951
|
text: {
|
|
@@ -780,16 +987,16 @@ const $15b9b26a1f4728d9$var$parseMarkedTokenToSlackRequest = (tokens, acc = [])=
|
|
|
780
987
|
return acc;
|
|
781
988
|
}, acc);
|
|
782
989
|
};
|
|
783
|
-
const $
|
|
784
|
-
const tokens = (0, $
|
|
785
|
-
const parsedTokens = $
|
|
786
|
-
return (0, $
|
|
990
|
+
const $8d24b15cb35479b5$var$convertMarkdownToSlack = (text)=>{
|
|
991
|
+
const tokens = (0, $8JZgm$marked.Lexer).lex(text);
|
|
992
|
+
const parsedTokens = $8d24b15cb35479b5$var$parseMarkedTokenToSlackRequest(tokens);
|
|
993
|
+
return (0, $8JZgm$lodash.filter)(parsedTokens, (x)=>!(0, $8JZgm$lodash.isString)(x));
|
|
787
994
|
};
|
|
788
|
-
var $
|
|
995
|
+
var $8d24b15cb35479b5$export$2e2bcd8739ae039 = $8d24b15cb35479b5$var$convertMarkdownToSlack;
|
|
789
996
|
|
|
790
997
|
|
|
791
998
|
|
|
792
|
-
const $
|
|
999
|
+
const $24e1f903aef46c44$var$formatPlainText = (x)=>{
|
|
793
1000
|
if (x) {
|
|
794
1001
|
if (x.href) return `[${x.plain_text}](${x.href.startsWith("/") ? `https://www.notion.so${x.href}` : x.href})`;
|
|
795
1002
|
const isBold = x.annotations?.bold;
|
|
@@ -806,10 +1013,10 @@ const $6c8155c4308ceae8$var$formatPlainText = (x)=>{
|
|
|
806
1013
|
return textToReturn;
|
|
807
1014
|
}
|
|
808
1015
|
};
|
|
809
|
-
const $
|
|
1016
|
+
const $24e1f903aef46c44$var$convertNotionToMd = function(block, level = 1) {
|
|
810
1017
|
const n = "\n\n";
|
|
811
1018
|
const data = block[block.type];
|
|
812
|
-
const plainText = data.rich_text ? data?.rich_text.map($
|
|
1019
|
+
const plainText = data.rich_text ? data?.rich_text.map($24e1f903aef46c44$var$formatPlainText) : [];
|
|
813
1020
|
// @ts-ignore
|
|
814
1021
|
const caption = data?.caption ? data.caption.map((x)=>x?.plain_text) : [];
|
|
815
1022
|
let childData = "";
|
|
@@ -817,11 +1024,11 @@ const $6c8155c4308ceae8$var$convertNotionToMd = function(block, level = 1) {
|
|
|
817
1024
|
case "bookmark":
|
|
818
1025
|
return `[${data.url}](data.url)${n}`;
|
|
819
1026
|
case "bulleted_list_item":
|
|
820
|
-
childData = (0, $
|
|
821
|
-
return `- ${plainText.join("")}\n` + (childData ? `${(0, $
|
|
1027
|
+
childData = (0, $8JZgm$lodash.map)(block.children, (child)=>$24e1f903aef46c44$var$convertNotionToMd(child, level + 1)).join((0, $8JZgm$lodash.repeat)(" ", level));
|
|
1028
|
+
return `- ${plainText.join("")}\n` + (childData ? `${(0, $8JZgm$lodash.repeat)(" ", level)}${childData}` : "");
|
|
822
1029
|
case "numbered_list_item":
|
|
823
|
-
childData = (0, $
|
|
824
|
-
return `${block.number}. ${plainText.join("")}\n` + (childData ? `${(0, $
|
|
1030
|
+
childData = (0, $8JZgm$lodash.map)(block.children, (child)=>$24e1f903aef46c44$var$convertNotionToMd(child, level + 1)).join((0, $8JZgm$lodash.repeat)(" ", level));
|
|
1031
|
+
return `${block.number}. ${plainText.join("")}\n` + (childData ? `${(0, $8JZgm$lodash.repeat)(" ", level)}${childData}` : "");
|
|
825
1032
|
case "quote":
|
|
826
1033
|
case "callout":
|
|
827
1034
|
return `> ${plainText.join("")}${n}`;
|
|
@@ -857,40 +1064,40 @@ const $6c8155c4308ceae8$var$convertNotionToMd = function(block, level = 1) {
|
|
|
857
1064
|
if (block.children) {
|
|
858
1065
|
const firstChild = block.children[0];
|
|
859
1066
|
const remainingChildren = block.children.slice(1);
|
|
860
|
-
const header = `| ${firstChild.table_row.cells.map((x)=>x.map((y)=>$
|
|
861
|
-
const divider = `|${(0, $
|
|
1067
|
+
const header = `| ${firstChild.table_row.cells.map((x)=>x.map((y)=>$24e1f903aef46c44$var$formatPlainText(y)).join("")).join(" | ")} |\n`;
|
|
1068
|
+
const divider = `|${(0, $8JZgm$lodash.repeat)("---|", data.table_width)}\n`;
|
|
862
1069
|
const rows = remainingChildren.map((row)=>{
|
|
863
|
-
return `| ${row.table_row.cells.map((x)=>x.map((y)=>$
|
|
1070
|
+
return `| ${row.table_row.cells.map((x)=>x.map((y)=>$24e1f903aef46c44$var$formatPlainText(y)).join("")).join(" | ")} |`;
|
|
864
1071
|
}).join("\n");
|
|
865
1072
|
return `${header}${divider}${rows}${n}`;
|
|
866
1073
|
}
|
|
867
1074
|
return `Table as CSV\n`;
|
|
868
1075
|
case "table_row":
|
|
869
|
-
return `| ${data.cells.map((x)=>x.map((y)=>$
|
|
1076
|
+
return `| ${data.cells.map((x)=>x.map((y)=>$24e1f903aef46c44$var$formatPlainText(y)).join("")).join(" | ")} |\n`;
|
|
870
1077
|
case "to_do":
|
|
871
|
-
childData = (0, $
|
|
872
|
-
return `- [${data.checked ? "X" : " "}] ${plainText.join("")}\n` + (childData ? `${(0, $
|
|
1078
|
+
childData = (0, $8JZgm$lodash.map)(block.children, (child)=>$24e1f903aef46c44$var$convertNotionToMd(child, level + 1)).join((0, $8JZgm$lodash.repeat)(" ", level));
|
|
1079
|
+
return `- [${data.checked ? "X" : " "}] ${plainText.join("")}\n` + (childData ? `${(0, $8JZgm$lodash.repeat)(" ", level)}${childData}` : "");
|
|
873
1080
|
default:
|
|
874
|
-
childData = (0, $
|
|
1081
|
+
childData = (0, $8JZgm$lodash.map)(block.children, (child)=>$24e1f903aef46c44$var$convertNotionToMd(child)).join("");
|
|
875
1082
|
return plainText.join("") + n + childData;
|
|
876
1083
|
}
|
|
877
1084
|
};
|
|
878
|
-
const $
|
|
1085
|
+
const $24e1f903aef46c44$var$resolveChildren = function(block, blocks) {
|
|
879
1086
|
if (!block.has_children) return block;
|
|
880
1087
|
const children = blocks.filter((x)=>x.parent_id === block.id);
|
|
881
1088
|
return {
|
|
882
1089
|
...block,
|
|
883
|
-
children: children.map((child)=>$
|
|
1090
|
+
children: children.map((child)=>$24e1f903aef46c44$var$resolveChildren(child, blocks))
|
|
884
1091
|
};
|
|
885
1092
|
};
|
|
886
|
-
const $
|
|
1093
|
+
const $24e1f903aef46c44$var$numberOrderedLists = function(blocks) {
|
|
887
1094
|
let number = 0;
|
|
888
1095
|
return blocks.map((block)=>{
|
|
889
1096
|
if (block.type !== "numbered_list_item") {
|
|
890
1097
|
number = 0;
|
|
891
1098
|
return block;
|
|
892
1099
|
} else {
|
|
893
|
-
if (block.children) block.children = $
|
|
1100
|
+
if (block.children) block.children = $24e1f903aef46c44$var$numberOrderedLists(block.children);
|
|
894
1101
|
return {
|
|
895
1102
|
...block,
|
|
896
1103
|
number: ++number
|
|
@@ -898,13 +1105,13 @@ const $6c8155c4308ceae8$var$numberOrderedLists = function(blocks) {
|
|
|
898
1105
|
}
|
|
899
1106
|
});
|
|
900
1107
|
};
|
|
901
|
-
const $
|
|
1108
|
+
const $24e1f903aef46c44$var$insertNewLinesBetweenLists = function(blocks) {
|
|
902
1109
|
const listBlocks = [
|
|
903
1110
|
"to_do",
|
|
904
1111
|
"numbered_list_item",
|
|
905
1112
|
"bulleted_list_item"
|
|
906
1113
|
];
|
|
907
|
-
return (0, $
|
|
1114
|
+
return (0, $8JZgm$lodash.flatten)(blocks.map((block, index)=>{
|
|
908
1115
|
const nextBlock = blocks[index + 1];
|
|
909
1116
|
const nextBlockType = nextBlock?.type;
|
|
910
1117
|
if (listBlocks.includes(block.type) && !listBlocks.includes(nextBlockType)) return [
|
|
@@ -920,19 +1127,19 @@ const $6c8155c4308ceae8$var$insertNewLinesBetweenLists = function(blocks) {
|
|
|
920
1127
|
return block;
|
|
921
1128
|
}));
|
|
922
1129
|
};
|
|
923
|
-
const $
|
|
924
|
-
const arrayBlocks = $
|
|
925
|
-
const parentBlocks = (0, $
|
|
926
|
-
const blocksWithChildren = $
|
|
927
|
-
return $
|
|
1130
|
+
const $24e1f903aef46c44$var$convertNotionToMarkdown = function(blocks) {
|
|
1131
|
+
const arrayBlocks = $24e1f903aef46c44$var$insertNewLinesBetweenLists((0, $8JZgm$lodash.castArray)(blocks));
|
|
1132
|
+
const parentBlocks = (0, $8JZgm$lodash.reject)(arrayBlocks, (block)=>block.parent?.type === "block_id");
|
|
1133
|
+
const blocksWithChildren = $24e1f903aef46c44$var$numberOrderedLists(parentBlocks.map((block)=>{
|
|
1134
|
+
return $24e1f903aef46c44$var$resolveChildren(block, arrayBlocks);
|
|
928
1135
|
}));
|
|
929
|
-
return blocksWithChildren.map((block)=>$
|
|
1136
|
+
return blocksWithChildren.map((block)=>$24e1f903aef46c44$var$convertNotionToMd(block)).join("");
|
|
930
1137
|
};
|
|
931
|
-
var $
|
|
1138
|
+
var $24e1f903aef46c44$export$2e2bcd8739ae039 = $24e1f903aef46c44$var$convertNotionToMarkdown;
|
|
932
1139
|
|
|
933
1140
|
|
|
934
1141
|
|
|
935
|
-
function $
|
|
1142
|
+
function $2d4e342e27d0a138$var$convertNotionToMd(block) {
|
|
936
1143
|
const data = block[block.type];
|
|
937
1144
|
const plainText = data.rich_text ? data.rich_text.map((x)=>{
|
|
938
1145
|
if (x) {
|
|
@@ -944,27 +1151,27 @@ function $4eadef396bf1c54e$var$convertNotionToMd(block) {
|
|
|
944
1151
|
const caption = data.caption ? data.caption.map((x)=>x?.plain_text) : [];
|
|
945
1152
|
switch(block.type){
|
|
946
1153
|
case "bookmark":
|
|
947
|
-
return (0, ($parcel$interopDefault($
|
|
1154
|
+
return (0, ($parcel$interopDefault($8JZgm$json2md)))({
|
|
948
1155
|
link: {
|
|
949
1156
|
title: data.url,
|
|
950
1157
|
source: data.url
|
|
951
1158
|
}
|
|
952
1159
|
});
|
|
953
1160
|
case "bulleted_list_item":
|
|
954
|
-
return `${(0, ($parcel$interopDefault($
|
|
1161
|
+
return `${(0, ($parcel$interopDefault($8JZgm$json2md)))({
|
|
955
1162
|
ul: plainText
|
|
956
1163
|
}).trim()} \n`;
|
|
957
1164
|
case "numbered_list_item":
|
|
958
|
-
return `${(0, ($parcel$interopDefault($
|
|
1165
|
+
return `${(0, ($parcel$interopDefault($8JZgm$json2md)))({
|
|
959
1166
|
ol: plainText
|
|
960
1167
|
}).trim()} \n`;
|
|
961
1168
|
case "quote":
|
|
962
1169
|
case "callout":
|
|
963
|
-
return (0, ($parcel$interopDefault($
|
|
1170
|
+
return (0, ($parcel$interopDefault($8JZgm$json2md)))({
|
|
964
1171
|
blockquote: plainText
|
|
965
1172
|
});
|
|
966
1173
|
case "code":
|
|
967
|
-
return (0, ($parcel$interopDefault($
|
|
1174
|
+
return (0, ($parcel$interopDefault($8JZgm$json2md)))({
|
|
968
1175
|
code: {
|
|
969
1176
|
language: data.language,
|
|
970
1177
|
content: plainText
|
|
@@ -973,55 +1180,55 @@ function $4eadef396bf1c54e$var$convertNotionToMd(block) {
|
|
|
973
1180
|
case "divider":
|
|
974
1181
|
return "--- \n";
|
|
975
1182
|
case "embed":
|
|
976
|
-
return (0, ($parcel$interopDefault($
|
|
1183
|
+
return (0, ($parcel$interopDefault($8JZgm$json2md)))({
|
|
977
1184
|
link: {
|
|
978
1185
|
title: caption.length ? caption : "Embed",
|
|
979
1186
|
source: data.url
|
|
980
1187
|
}
|
|
981
1188
|
});
|
|
982
1189
|
case "equation":
|
|
983
|
-
return (0, ($parcel$interopDefault($
|
|
1190
|
+
return (0, ($parcel$interopDefault($8JZgm$json2md)))({
|
|
984
1191
|
p: data.expression
|
|
985
1192
|
});
|
|
986
1193
|
case "paragraph":
|
|
987
|
-
return (0, ($parcel$interopDefault($
|
|
1194
|
+
return (0, ($parcel$interopDefault($8JZgm$json2md)))({
|
|
988
1195
|
p: plainText.join("")
|
|
989
1196
|
});
|
|
990
1197
|
case "video":
|
|
991
1198
|
case "pdf":
|
|
992
1199
|
case "file":
|
|
993
|
-
return (0, ($parcel$interopDefault($
|
|
1200
|
+
return (0, ($parcel$interopDefault($8JZgm$json2md)))({
|
|
994
1201
|
link: {
|
|
995
1202
|
title: caption.length ? caption : "File",
|
|
996
1203
|
source: data.file ? data.file.url : data.external ? data.external.url : ""
|
|
997
1204
|
}
|
|
998
1205
|
});
|
|
999
1206
|
case "heading_1":
|
|
1000
|
-
return (0, ($parcel$interopDefault($
|
|
1207
|
+
return (0, ($parcel$interopDefault($8JZgm$json2md)))({
|
|
1001
1208
|
h1: plainText
|
|
1002
1209
|
});
|
|
1003
1210
|
case "heading_2":
|
|
1004
|
-
return (0, ($parcel$interopDefault($
|
|
1211
|
+
return (0, ($parcel$interopDefault($8JZgm$json2md)))({
|
|
1005
1212
|
h2: plainText
|
|
1006
1213
|
});
|
|
1007
1214
|
case "heading_3":
|
|
1008
|
-
return (0, ($parcel$interopDefault($
|
|
1215
|
+
return (0, ($parcel$interopDefault($8JZgm$json2md)))({
|
|
1009
1216
|
h3: plainText
|
|
1010
1217
|
});
|
|
1011
1218
|
case "heading_4":
|
|
1012
|
-
return (0, ($parcel$interopDefault($
|
|
1219
|
+
return (0, ($parcel$interopDefault($8JZgm$json2md)))({
|
|
1013
1220
|
h4: plainText
|
|
1014
1221
|
});
|
|
1015
1222
|
case "heading_5":
|
|
1016
|
-
return (0, ($parcel$interopDefault($
|
|
1223
|
+
return (0, ($parcel$interopDefault($8JZgm$json2md)))({
|
|
1017
1224
|
h5: plainText
|
|
1018
1225
|
});
|
|
1019
1226
|
case "heading_6":
|
|
1020
|
-
return (0, ($parcel$interopDefault($
|
|
1227
|
+
return (0, ($parcel$interopDefault($8JZgm$json2md)))({
|
|
1021
1228
|
h6: plainText
|
|
1022
1229
|
});
|
|
1023
1230
|
case "image":
|
|
1024
|
-
return (0, ($parcel$interopDefault($
|
|
1231
|
+
return (0, ($parcel$interopDefault($8JZgm$json2md)))({
|
|
1025
1232
|
img: {
|
|
1026
1233
|
title: caption.length ? caption : "Image",
|
|
1027
1234
|
// @ts-ignore
|
|
@@ -1030,33 +1237,33 @@ function $4eadef396bf1c54e$var$convertNotionToMd(block) {
|
|
|
1030
1237
|
}
|
|
1031
1238
|
});
|
|
1032
1239
|
case "table":
|
|
1033
|
-
return (0, ($parcel$interopDefault($
|
|
1240
|
+
return (0, ($parcel$interopDefault($8JZgm$json2md)))({
|
|
1034
1241
|
p: "Tabular values as CSV"
|
|
1035
1242
|
});
|
|
1036
1243
|
case "table_row":
|
|
1037
1244
|
// @ts-ignore
|
|
1038
|
-
return (0, ($parcel$interopDefault($
|
|
1245
|
+
return (0, ($parcel$interopDefault($8JZgm$json2md)))({
|
|
1039
1246
|
p: data.cells.map((x)=>x[0]?.plain_text).join(",")
|
|
1040
1247
|
});
|
|
1041
1248
|
case "to_do":
|
|
1042
1249
|
return `- [${data.checked ? "X" : " "}] ${plainText.join("")}\n`;
|
|
1043
1250
|
default:
|
|
1044
|
-
return (0, ($parcel$interopDefault($
|
|
1251
|
+
return (0, ($parcel$interopDefault($8JZgm$json2md)))({
|
|
1045
1252
|
p: plainText.join("")
|
|
1046
1253
|
});
|
|
1047
1254
|
}
|
|
1048
1255
|
}
|
|
1049
|
-
var $
|
|
1256
|
+
var $2d4e342e27d0a138$export$2e2bcd8739ae039 = $2d4e342e27d0a138$var$convertNotionToMd;
|
|
1050
1257
|
|
|
1051
1258
|
|
|
1052
1259
|
|
|
1053
|
-
const $
|
|
1054
|
-
const $
|
|
1055
|
-
const $
|
|
1056
|
-
const $
|
|
1260
|
+
const $b093023fe7f4f0a3$var$isString = (value)=>typeof value === "string" || value instanceof String;
|
|
1261
|
+
const $b093023fe7f4f0a3$var$isNumber = (value)=>typeof value === "number";
|
|
1262
|
+
const $b093023fe7f4f0a3$var$isArray = (value)=>Array.isArray(value);
|
|
1263
|
+
const $b093023fe7f4f0a3$var$isPlainObject = (value)=>{
|
|
1057
1264
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
1058
1265
|
};
|
|
1059
|
-
function $
|
|
1266
|
+
function $b093023fe7f4f0a3$var$mapValues(originalValue, mapping, lowerCase = false, defaultValue = null) {
|
|
1060
1267
|
if ((originalValue === null || originalValue === undefined) && defaultValue !== null) return defaultValue;
|
|
1061
1268
|
if (mapping === null || mapping === undefined) return originalValue;
|
|
1062
1269
|
let newMapping = {};
|
|
@@ -1066,26 +1273,26 @@ function $cc0827b1147b8d10$var$mapValues(originalValue, mapping, lowerCase = fal
|
|
|
1066
1273
|
else newMapping = {
|
|
1067
1274
|
...mapping
|
|
1068
1275
|
};
|
|
1069
|
-
if ($
|
|
1276
|
+
if ($b093023fe7f4f0a3$var$isString(originalValue) || $b093023fe7f4f0a3$var$isNumber(originalValue)) {
|
|
1070
1277
|
const val = newMapping[originalValue.toString().toLowerCase()];
|
|
1071
1278
|
if (val === null || val === undefined) return originalValue;
|
|
1072
1279
|
if (val === false) return val;
|
|
1073
1280
|
return val;
|
|
1074
1281
|
}
|
|
1075
|
-
if ($
|
|
1076
|
-
if ($
|
|
1282
|
+
if ($b093023fe7f4f0a3$var$isArray(originalValue)) return originalValue.map((value)=>$b093023fe7f4f0a3$var$mapValues(value, newMapping, true));
|
|
1283
|
+
if ($b093023fe7f4f0a3$var$isPlainObject(originalValue)) {
|
|
1077
1284
|
const result = {};
|
|
1078
1285
|
Object.entries(originalValue).forEach(([key, value])=>{
|
|
1079
|
-
result[key] = $
|
|
1286
|
+
result[key] = $b093023fe7f4f0a3$var$mapValues(value, newMapping, true);
|
|
1080
1287
|
});
|
|
1081
1288
|
return result;
|
|
1082
1289
|
}
|
|
1083
1290
|
return originalValue;
|
|
1084
1291
|
}
|
|
1085
|
-
var $
|
|
1292
|
+
var $b093023fe7f4f0a3$export$2e2bcd8739ae039 = $b093023fe7f4f0a3$var$mapValues;
|
|
1086
1293
|
|
|
1087
1294
|
|
|
1088
|
-
const $
|
|
1295
|
+
const $30e62e8c4ba4c451$var$operatorMapping = {
|
|
1089
1296
|
eq: "=",
|
|
1090
1297
|
ne: "<>",
|
|
1091
1298
|
gt: ">",
|
|
@@ -1096,7 +1303,7 @@ const $f3c3a16d1adbba55$var$operatorMapping = {
|
|
|
1096
1303
|
nin: "not in",
|
|
1097
1304
|
like: "like"
|
|
1098
1305
|
};
|
|
1099
|
-
const $
|
|
1306
|
+
const $30e62e8c4ba4c451$var$convertToDataType = (value, key, dataType, useDoubleQuotes = false, noQuotes = false, noQuotesForDate = false, escapeSingleQuotes = false)=>{
|
|
1100
1307
|
const dataTypeKey = dataType[key];
|
|
1101
1308
|
if (value === undefined || value === null) return value;
|
|
1102
1309
|
if (dataTypeKey === "string") {
|
|
@@ -1105,30 +1312,30 @@ const $f3c3a16d1adbba55$var$convertToDataType = (value, key, dataType, useDouble
|
|
|
1105
1312
|
else if (escapeSingleQuotes) return `'${value.replace(/'/g, "\\'")}'`;
|
|
1106
1313
|
else return `'${value}'`;
|
|
1107
1314
|
}
|
|
1108
|
-
if (dataTypeKey === "dotnetdate") return `DateTime(${(0, $
|
|
1315
|
+
if (dataTypeKey === "dotnetdate") return `DateTime(${(0, $8JZgm$luxon.DateTime).fromISO(value).toFormat("yyyy,MM,dd")})`;
|
|
1109
1316
|
if (typeof dataTypeKey === "object") {
|
|
1110
|
-
const val = (0, $
|
|
1317
|
+
const val = (0, $b093023fe7f4f0a3$export$2e2bcd8739ae039)(value, dataType[key]);
|
|
1111
1318
|
if (typeof val === "string" || val instanceof String) return noQuotes ? val : useDoubleQuotes ? `"${val}"` : `'${val}'`;
|
|
1112
1319
|
return val;
|
|
1113
1320
|
}
|
|
1114
1321
|
if (dataTypeKey && dataTypeKey.startsWith("date")) {
|
|
1115
1322
|
const format = dataTypeKey.split("|")[1];
|
|
1116
|
-
const date = format ? (0, $
|
|
1323
|
+
const date = format ? (0, $8JZgm$luxon.DateTime).fromISO(value).toFormat(format) : (0, $8JZgm$luxon.DateTime).fromISO(value).toISO();
|
|
1117
1324
|
return noQuotes || noQuotesForDate ? date : useDoubleQuotes ? `"${date}"` : `'${date}'`;
|
|
1118
1325
|
}
|
|
1119
1326
|
return value;
|
|
1120
1327
|
};
|
|
1121
|
-
function $
|
|
1328
|
+
function $30e62e8c4ba4c451$var$getSqlString({ key: key , operator: operator , value: value , useSpace: useSpace = false }) {
|
|
1122
1329
|
const space = useSpace ? " " : "";
|
|
1123
1330
|
return `${key}${space}${operator}${space}${value}`;
|
|
1124
1331
|
}
|
|
1125
|
-
function $
|
|
1332
|
+
function $30e62e8c4ba4c451$var$convertQueryToSql(query, keysToMap = [], mapping = {}, dataTypes = {}, customOperatorMapping = {}, options = {}) {
|
|
1126
1333
|
const conjunction = options.conjunction || "AND";
|
|
1127
1334
|
const statement = [];
|
|
1128
1335
|
const keys = !keysToMap.length ? Object.keys(query) : keysToMap;
|
|
1129
1336
|
for (const key of keys){
|
|
1130
1337
|
if (key === "or") {
|
|
1131
|
-
const orPart = $
|
|
1338
|
+
const orPart = $30e62e8c4ba4c451$var$convertQueryToSql(query[key], keys, mapping, dataTypes, customOperatorMapping, options);
|
|
1132
1339
|
statement.push("(" + orPart + ")");
|
|
1133
1340
|
continue;
|
|
1134
1341
|
}
|
|
@@ -1142,11 +1349,11 @@ function $f3c3a16d1adbba55$var$convertQueryToSql(query, keysToMap = [], mapping
|
|
|
1142
1349
|
else if (typeof comparison === "object") operators = Object.keys(comparison);
|
|
1143
1350
|
const sqlKey = mapping[key] || key;
|
|
1144
1351
|
for (const operator of operators){
|
|
1145
|
-
const comparator = customOperatorMapping[operator] || $
|
|
1352
|
+
const comparator = customOperatorMapping[operator] || $30e62e8c4ba4c451$var$operatorMapping[operator];
|
|
1146
1353
|
if (operator !== "in" && operator !== "nin" && comparator) {
|
|
1147
1354
|
const value = typeof comparison === "object" ? comparison[operator] : comparison;
|
|
1148
|
-
const valueToInsert = $
|
|
1149
|
-
if (valueToInsert !== undefined && valueToInsert !== null) statement.push($
|
|
1355
|
+
const valueToInsert = $30e62e8c4ba4c451$var$convertToDataType(value, key, dataTypes, options.useDoubleQuotes, options.noQuotes, options.noQuotesForDate, options.escapeSingleQuotes);
|
|
1356
|
+
if (valueToInsert !== undefined && valueToInsert !== null) statement.push($30e62e8c4ba4c451$var$getSqlString({
|
|
1150
1357
|
key: sqlKey,
|
|
1151
1358
|
operator: comparator,
|
|
1152
1359
|
value: valueToInsert,
|
|
@@ -1158,10 +1365,10 @@ function $f3c3a16d1adbba55$var$convertQueryToSql(query, keysToMap = [], mapping
|
|
|
1158
1365
|
const value = Array.isArray(comparison) ? comparison : comparison[operator];
|
|
1159
1366
|
if (options.useOrForIn) {
|
|
1160
1367
|
const orStatement = [];
|
|
1161
|
-
const eqOperator = customOperatorMapping["eq"] || $
|
|
1368
|
+
const eqOperator = customOperatorMapping["eq"] || $30e62e8c4ba4c451$var$operatorMapping["eq"];
|
|
1162
1369
|
for (const v of value){
|
|
1163
|
-
const valueToInsert = $
|
|
1164
|
-
if (valueToInsert !== undefined && valueToInsert !== null) orStatement.push($
|
|
1370
|
+
const valueToInsert = $30e62e8c4ba4c451$var$convertToDataType(v, key, dataTypes, options.useDoubleQuotes, options.noQuotes, options.noQuotesForDate, options.escapeSingleQuotes);
|
|
1371
|
+
if (valueToInsert !== undefined && valueToInsert !== null) orStatement.push($30e62e8c4ba4c451$var$getSqlString({
|
|
1165
1372
|
key: sqlKey,
|
|
1166
1373
|
operator: eqOperator,
|
|
1167
1374
|
value: valueToInsert,
|
|
@@ -1171,11 +1378,11 @@ function $f3c3a16d1adbba55$var$convertQueryToSql(query, keysToMap = [], mapping
|
|
|
1171
1378
|
statement.push("(" + orStatement.join(" OR ") + ")");
|
|
1172
1379
|
continue;
|
|
1173
1380
|
}
|
|
1174
|
-
statement.push($
|
|
1381
|
+
statement.push($30e62e8c4ba4c451$var$getSqlString({
|
|
1175
1382
|
key: sqlKey,
|
|
1176
1383
|
operator: comparator,
|
|
1177
1384
|
value: `(${value.map((v)=>{
|
|
1178
|
-
return $
|
|
1385
|
+
return $30e62e8c4ba4c451$var$convertToDataType(v, key, dataTypes, options.useDoubleQuotes, options.noQuotes, options.noQuotesForDate, options.escapeSingleQuotes);
|
|
1179
1386
|
}).join(",")})`,
|
|
1180
1387
|
useSpace: !options.noSpaceBetweenOperator
|
|
1181
1388
|
}));
|
|
@@ -1187,10 +1394,10 @@ function $f3c3a16d1adbba55$var$convertQueryToSql(query, keysToMap = [], mapping
|
|
|
1187
1394
|
if (options.groupComparisonInBrackets && statement.length) return statement.reduce((acc, condition)=>`(${acc} ${conjunction} ${condition})`);
|
|
1188
1395
|
return statement.join(` ${conjunction} `);
|
|
1189
1396
|
}
|
|
1190
|
-
var $
|
|
1397
|
+
var $30e62e8c4ba4c451$export$2e2bcd8739ae039 = $30e62e8c4ba4c451$var$convertQueryToSql;
|
|
1191
1398
|
|
|
1192
1399
|
|
|
1193
|
-
function $
|
|
1400
|
+
function $775b7a4456485592$export$2e2bcd8739ae039(buffer, urlSafe = false) {
|
|
1194
1401
|
let binary = "";
|
|
1195
1402
|
const bytes = new Uint8Array(buffer);
|
|
1196
1403
|
const len = bytes.byteLength;
|
|
@@ -1200,52 +1407,52 @@ function $c9ed3be7896125da$export$2e2bcd8739ae039(buffer, urlSafe = false) {
|
|
|
1200
1407
|
}
|
|
1201
1408
|
|
|
1202
1409
|
|
|
1203
|
-
const $
|
|
1410
|
+
const $29efd9e603b1d9b3$var$digest = async (text, algorithm = "SHA-256", stringType = "hex")=>{
|
|
1204
1411
|
const encoder = new TextEncoder();
|
|
1205
1412
|
const data = encoder.encode(text);
|
|
1206
1413
|
const hashBuffer = await crypto.subtle.digest(algorithm, data);
|
|
1207
1414
|
if (stringType === "hex") {
|
|
1208
1415
|
const hashArray = Array.from(new Uint8Array(hashBuffer));
|
|
1209
1416
|
return hashArray.map((b)=>b.toString(16).padStart(2, "0")).join("");
|
|
1210
|
-
} else if (stringType === "base64") return (0, $
|
|
1211
|
-
else if (stringType === "base64-urlSafe") return (0, $
|
|
1417
|
+
} else if (stringType === "base64") return (0, $775b7a4456485592$export$2e2bcd8739ae039)(hashBuffer);
|
|
1418
|
+
else if (stringType === "base64-urlSafe") return (0, $775b7a4456485592$export$2e2bcd8739ae039)(hashBuffer, true);
|
|
1212
1419
|
};
|
|
1213
|
-
var $
|
|
1420
|
+
var $29efd9e603b1d9b3$export$2e2bcd8739ae039 = $29efd9e603b1d9b3$var$digest;
|
|
1214
1421
|
|
|
1215
1422
|
|
|
1216
1423
|
|
|
1217
|
-
function $
|
|
1218
|
-
if (format === "RFC2822") return (0, $
|
|
1219
|
-
if (format === "ISO") return (0, $
|
|
1220
|
-
if (format === "fromSeconds") return (0, $
|
|
1221
|
-
return (0, $
|
|
1424
|
+
function $b705f929f872f04a$var$dtFromFormat(date, format) {
|
|
1425
|
+
if (format === "RFC2822") return (0, $8JZgm$luxon.DateTime).fromRFC2822(date);
|
|
1426
|
+
if (format === "ISO") return (0, $8JZgm$luxon.DateTime).fromISO(date);
|
|
1427
|
+
if (format === "fromSeconds") return (0, $8JZgm$luxon.DateTime).fromSeconds(parseInt(date));
|
|
1428
|
+
return (0, $8JZgm$luxon.DateTime).fromFormat(date, format);
|
|
1222
1429
|
}
|
|
1223
|
-
var $
|
|
1430
|
+
var $b705f929f872f04a$export$2e2bcd8739ae039 = $b705f929f872f04a$var$dtFromFormat;
|
|
1224
1431
|
|
|
1225
1432
|
|
|
1226
1433
|
|
|
1227
|
-
function $
|
|
1228
|
-
return (0, $
|
|
1434
|
+
function $c69f207ac6d23ec9$var$dtFromIso(arg) {
|
|
1435
|
+
return (0, $8JZgm$luxon.DateTime).fromISO(arg);
|
|
1229
1436
|
}
|
|
1230
|
-
var $
|
|
1437
|
+
var $c69f207ac6d23ec9$export$2e2bcd8739ae039 = $c69f207ac6d23ec9$var$dtFromIso;
|
|
1231
1438
|
|
|
1232
1439
|
|
|
1233
|
-
function $
|
|
1440
|
+
function $b1d8f4990aab4108$var$firstNonEmpty(...args) {
|
|
1234
1441
|
for (const arg of args){
|
|
1235
1442
|
if (arg !== undefined && arg !== null) return arg;
|
|
1236
1443
|
}
|
|
1237
1444
|
}
|
|
1238
|
-
var $
|
|
1445
|
+
var $b1d8f4990aab4108$export$2e2bcd8739ae039 = $b1d8f4990aab4108$var$firstNonEmpty;
|
|
1239
1446
|
|
|
1240
1447
|
|
|
1241
1448
|
|
|
1242
1449
|
|
|
1243
1450
|
|
|
1244
|
-
async function $
|
|
1245
|
-
if (!(0, $
|
|
1246
|
-
const chunks = (0, $
|
|
1247
|
-
return await (0, ($parcel$interopDefault($
|
|
1248
|
-
return await (0, ($parcel$interopDefault($
|
|
1451
|
+
async function $b98e369677054b00$var$generateEmbeddingsCohere(body, api_key) {
|
|
1452
|
+
if (!(0, $8JZgm$lodash.isEmpty)(body.texts)) {
|
|
1453
|
+
const chunks = (0, $8JZgm$lodash.chunk)((0, $8JZgm$lodash.castArray)(body.texts), 20);
|
|
1454
|
+
return await (0, ($parcel$interopDefault($8JZgm$pmap)))(chunks, async (chunk)=>{
|
|
1455
|
+
return await (0, ($parcel$interopDefault($8JZgm$pretry)))(async ()=>{
|
|
1249
1456
|
const response = await fetch("https://api.cohere.com/v2/embed", {
|
|
1250
1457
|
method: "POST",
|
|
1251
1458
|
headers: {
|
|
@@ -1262,7 +1469,7 @@ async function $caaee789061bb8bb$var$generateEmbeddingsCohere(body, api_key) {
|
|
|
1262
1469
|
if (!response.ok) {
|
|
1263
1470
|
if (response.status === 429) throw new Error("Rate limit exceeded");
|
|
1264
1471
|
if (response.status >= 500) throw new Error("Server error");
|
|
1265
|
-
throw new (0, $
|
|
1472
|
+
throw new (0, $8JZgm$pretry.AbortError)(await response.text());
|
|
1266
1473
|
}
|
|
1267
1474
|
return await response.json();
|
|
1268
1475
|
}, {
|
|
@@ -1273,7 +1480,7 @@ async function $caaee789061bb8bb$var$generateEmbeddingsCohere(body, api_key) {
|
|
|
1273
1480
|
}, {
|
|
1274
1481
|
concurrency: 1
|
|
1275
1482
|
});
|
|
1276
|
-
} else if (!(0, $
|
|
1483
|
+
} else if (!(0, $8JZgm$lodash.isEmpty)(body.images)) return await (0, ($parcel$interopDefault($8JZgm$pretry)))(async ()=>{
|
|
1277
1484
|
const response = await fetch("https://api.cohere.com/v2/embed", {
|
|
1278
1485
|
method: "POST",
|
|
1279
1486
|
headers: {
|
|
@@ -1287,7 +1494,7 @@ async function $caaee789061bb8bb$var$generateEmbeddingsCohere(body, api_key) {
|
|
|
1287
1494
|
if (!response.ok) {
|
|
1288
1495
|
if (response.status === 429) throw new Error("Rate limit exceeded");
|
|
1289
1496
|
if (response.status >= 500) throw new Error("Server error");
|
|
1290
|
-
throw new (0, $
|
|
1497
|
+
throw new (0, $8JZgm$pretry.AbortError)(await response.text());
|
|
1291
1498
|
}
|
|
1292
1499
|
return await response.json();
|
|
1293
1500
|
}, {
|
|
@@ -1296,17 +1503,17 @@ async function $caaee789061bb8bb$var$generateEmbeddingsCohere(body, api_key) {
|
|
|
1296
1503
|
minTimeout: 2500
|
|
1297
1504
|
});
|
|
1298
1505
|
}
|
|
1299
|
-
var $
|
|
1506
|
+
var $b98e369677054b00$export$2e2bcd8739ae039 = $b98e369677054b00$var$generateEmbeddingsCohere;
|
|
1300
1507
|
|
|
1301
1508
|
|
|
1302
1509
|
|
|
1303
|
-
async function $
|
|
1304
|
-
return file && (0, $
|
|
1510
|
+
async function $ccba597b054a97f2$var$getArrayBuffer(file) {
|
|
1511
|
+
return file && (0, $8JZgm$lodash.isFunction)(file.arrayBuffer) ? await file.arrayBuffer() : undefined;
|
|
1305
1512
|
}
|
|
1306
|
-
var $
|
|
1513
|
+
var $ccba597b054a97f2$export$2e2bcd8739ae039 = $ccba597b054a97f2$var$getArrayBuffer;
|
|
1307
1514
|
|
|
1308
1515
|
|
|
1309
|
-
async function $
|
|
1516
|
+
async function $da697c8f5d45fcb8$var$getDataUri(file, mimeType) {
|
|
1310
1517
|
if (!mimeType) throw new Error("Mime type is required");
|
|
1311
1518
|
if (file instanceof ReadableStream) {
|
|
1312
1519
|
const chunks = [];
|
|
@@ -1321,50 +1528,50 @@ async function $15c432f5f036a88a$var$getDataUri(file, mimeType) {
|
|
|
1321
1528
|
const base64Image = buffer.toString("base64");
|
|
1322
1529
|
return `data:${mimeType};base64,${base64Image}`;
|
|
1323
1530
|
}
|
|
1324
|
-
var $
|
|
1531
|
+
var $da697c8f5d45fcb8$export$2e2bcd8739ae039 = $da697c8f5d45fcb8$var$getDataUri;
|
|
1325
1532
|
|
|
1326
1533
|
|
|
1327
1534
|
|
|
1328
|
-
function $
|
|
1535
|
+
function $f79bdc02a50f4d01$var$getMimeType(extensionType) {
|
|
1329
1536
|
try {
|
|
1330
|
-
return (0, ($parcel$interopDefault($
|
|
1537
|
+
return (0, ($parcel$interopDefault($8JZgm$mime))).getType(extensionType);
|
|
1331
1538
|
} catch (e) {
|
|
1332
1539
|
return null;
|
|
1333
1540
|
}
|
|
1334
1541
|
}
|
|
1335
|
-
var $
|
|
1542
|
+
var $f79bdc02a50f4d01$export$2e2bcd8739ae039 = $f79bdc02a50f4d01$var$getMimeType;
|
|
1336
1543
|
|
|
1337
1544
|
|
|
1338
|
-
function $
|
|
1545
|
+
function $408f03f4788a3418$var$jsonParse(str) {
|
|
1339
1546
|
try {
|
|
1340
1547
|
return JSON.parse(str);
|
|
1341
1548
|
} catch (e) {
|
|
1342
1549
|
return null;
|
|
1343
1550
|
}
|
|
1344
1551
|
}
|
|
1345
|
-
var $
|
|
1552
|
+
var $408f03f4788a3418$export$2e2bcd8739ae039 = $408f03f4788a3418$var$jsonParse;
|
|
1346
1553
|
|
|
1347
1554
|
|
|
1348
1555
|
|
|
1349
|
-
function $
|
|
1556
|
+
function $f0a9eba86693900f$export$2e2bcd8739ae039(json, options = {
|
|
1350
1557
|
compact: true,
|
|
1351
1558
|
spaces: 4
|
|
1352
1559
|
}) {
|
|
1353
|
-
return (0, $
|
|
1560
|
+
return (0, $8JZgm$xmljs.js2xml)(json, options);
|
|
1354
1561
|
}
|
|
1355
1562
|
|
|
1356
1563
|
|
|
1357
1564
|
|
|
1358
1565
|
|
|
1359
1566
|
|
|
1360
|
-
function $
|
|
1567
|
+
function $0499a1669d807cf8$var$getNormalizedString(value) {
|
|
1361
1568
|
return value.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
1362
1569
|
}
|
|
1363
|
-
function $
|
|
1364
|
-
const normalizedValue = $
|
|
1365
|
-
const result = (0, $
|
|
1366
|
-
const normalizedPossibleValue = $
|
|
1367
|
-
const similarity = (0, $
|
|
1570
|
+
function $0499a1669d807cf8$var$mostSimilar(value, possibleValues, threshold = 0.8) {
|
|
1571
|
+
const normalizedValue = $0499a1669d807cf8$var$getNormalizedString(value);
|
|
1572
|
+
const result = (0, $8JZgm$lodash.reduce)(possibleValues, (acc, possibleValue)=>{
|
|
1573
|
+
const normalizedPossibleValue = $0499a1669d807cf8$var$getNormalizedString(possibleValue);
|
|
1574
|
+
const similarity = (0, $8JZgm$dicecoefficient.diceCoefficient)(normalizedValue, normalizedPossibleValue);
|
|
1368
1575
|
if (similarity > acc.similarity) return {
|
|
1369
1576
|
similarity: similarity,
|
|
1370
1577
|
value: possibleValue
|
|
@@ -1376,15 +1583,15 @@ function $06ecced17a74bf4a$var$mostSimilar(value, possibleValues, threshold = 0.
|
|
|
1376
1583
|
});
|
|
1377
1584
|
return result.similarity >= threshold ? result.value : value;
|
|
1378
1585
|
}
|
|
1379
|
-
var $
|
|
1586
|
+
var $0499a1669d807cf8$export$2e2bcd8739ae039 = $0499a1669d807cf8$var$mostSimilar;
|
|
1380
1587
|
|
|
1381
1588
|
|
|
1382
1589
|
|
|
1383
|
-
async function $
|
|
1590
|
+
async function $8bd834eb1e3f8e3b$var$parseDocument(file, fileType) {
|
|
1384
1591
|
const documentParserApiUrl = this.environment.lookup("documentParserApiUrl");
|
|
1385
1592
|
const documentParserApiKey = this.environment.lookup("documentParserApiKey");
|
|
1386
1593
|
if (!documentParserApiKey) throw new Error("API key not found in environment");
|
|
1387
|
-
return await (0, ($parcel$interopDefault($
|
|
1594
|
+
return await (0, ($parcel$interopDefault($8JZgm$pretry)))(async ()=>{
|
|
1388
1595
|
const response = await fetch(`${documentParserApiUrl}/parse`, {
|
|
1389
1596
|
method: "POST",
|
|
1390
1597
|
headers: {
|
|
@@ -1398,7 +1605,7 @@ async function $05e3378f7c17d263$var$parseDocument(file, fileType) {
|
|
|
1398
1605
|
if (!response.ok) {
|
|
1399
1606
|
if (response.status === 429) throw new Error("Rate limit exceeded");
|
|
1400
1607
|
if (response.status >= 500) throw new Error("Server error");
|
|
1401
|
-
throw new (0, $
|
|
1608
|
+
throw new (0, $8JZgm$pretry.AbortError)(await response.text());
|
|
1402
1609
|
}
|
|
1403
1610
|
const data = await response.json();
|
|
1404
1611
|
return data.content;
|
|
@@ -1408,54 +1615,54 @@ async function $05e3378f7c17d263$var$parseDocument(file, fileType) {
|
|
|
1408
1615
|
minTimeout: 2500
|
|
1409
1616
|
});
|
|
1410
1617
|
}
|
|
1411
|
-
var $
|
|
1618
|
+
var $8bd834eb1e3f8e3b$export$2e2bcd8739ae039 = $8bd834eb1e3f8e3b$var$parseDocument;
|
|
1412
1619
|
|
|
1413
1620
|
|
|
1414
1621
|
|
|
1415
|
-
function $
|
|
1416
|
-
return (0, ($parcel$interopDefault($
|
|
1622
|
+
function $64d027222fb6f315$export$2e2bcd8739ae039(query, options) {
|
|
1623
|
+
return (0, ($parcel$interopDefault($8JZgm$qs))).parse(query, options);
|
|
1417
1624
|
}
|
|
1418
1625
|
|
|
1419
1626
|
|
|
1420
|
-
function $
|
|
1627
|
+
function $5fa5a84ddddfceec$var$parseUrl(url) {
|
|
1421
1628
|
return new URL(url);
|
|
1422
1629
|
}
|
|
1423
|
-
var $
|
|
1630
|
+
var $5fa5a84ddddfceec$export$2e2bcd8739ae039 = $5fa5a84ddddfceec$var$parseUrl;
|
|
1424
1631
|
|
|
1425
1632
|
|
|
1426
1633
|
|
|
1427
1634
|
|
|
1428
|
-
async function $
|
|
1635
|
+
async function $b566d11c5b9df7cf$export$e600492876ee595b(text, options = {
|
|
1429
1636
|
chunkSize: 200,
|
|
1430
1637
|
chunkOverlap: 60
|
|
1431
1638
|
}) {
|
|
1432
1639
|
let textToSplit;
|
|
1433
|
-
if ((0, $
|
|
1434
|
-
else if ((0, $
|
|
1435
|
-
else textToSplit = (0, $
|
|
1436
|
-
const splitter = new (0, $
|
|
1640
|
+
if ((0, $8JZgm$lodash.isString)(text)) textToSplit = text;
|
|
1641
|
+
else if ((0, $8JZgm$lodash.isPlainObject)(text) || (0, $8JZgm$lodash.isArray)(text)) textToSplit = JSON.stringify(text, null, 2);
|
|
1642
|
+
else textToSplit = (0, $8JZgm$lodash.toString)(text);
|
|
1643
|
+
const splitter = new (0, $8JZgm$langchaintextsplitters.RecursiveCharacterTextSplitter)(options);
|
|
1437
1644
|
return splitter.splitText(textToSplit);
|
|
1438
1645
|
}
|
|
1439
1646
|
|
|
1440
1647
|
|
|
1441
|
-
function $
|
|
1648
|
+
function $46d8c3f9d4f3a84d$var$removeEmpty(arg) {
|
|
1442
1649
|
return arg.length ? arg : undefined;
|
|
1443
1650
|
}
|
|
1444
|
-
var $
|
|
1651
|
+
var $46d8c3f9d4f3a84d$export$2e2bcd8739ae039 = $46d8c3f9d4f3a84d$var$removeEmpty;
|
|
1445
1652
|
|
|
1446
1653
|
|
|
1447
|
-
function $
|
|
1654
|
+
function $89073b7697efe215$var$removeEmptyItems(arg) {
|
|
1448
1655
|
if (!Array.isArray(arg)) return arg;
|
|
1449
1656
|
return arg.filter((item)=>{
|
|
1450
1657
|
if (item && typeof item === "object") return Object.keys(item).length > 0;
|
|
1451
1658
|
return item;
|
|
1452
1659
|
});
|
|
1453
1660
|
}
|
|
1454
|
-
var $
|
|
1661
|
+
var $89073b7697efe215$export$2e2bcd8739ae039 = $89073b7697efe215$var$removeEmptyItems;
|
|
1455
1662
|
|
|
1456
1663
|
|
|
1457
1664
|
|
|
1458
|
-
const $
|
|
1665
|
+
const $81ab94868fc7e61b$var$sign = async (text, algorithm = "SHA-256", secret, outputFormat = "hex")=>{
|
|
1459
1666
|
const key = await crypto.subtle.importKey("raw", new TextEncoder().encode(secret), {
|
|
1460
1667
|
name: "HMAC",
|
|
1461
1668
|
hash: algorithm
|
|
@@ -1468,19 +1675,19 @@ const $256af523deaf5315$var$sign = async (text, algorithm = "SHA-256", secret, o
|
|
|
1468
1675
|
if (outputFormat === "hex") {
|
|
1469
1676
|
const hashArray = Array.from(new Uint8Array(hashBuffer));
|
|
1470
1677
|
return hashArray.map((b)=>b.toString(16).padStart(2, "0")).join("");
|
|
1471
|
-
} else if (outputFormat === "base64") return (0, $
|
|
1472
|
-
else if (outputFormat === "base64-urlSafe") return (0, $
|
|
1678
|
+
} else if (outputFormat === "base64") return (0, $775b7a4456485592$export$2e2bcd8739ae039)(hashBuffer);
|
|
1679
|
+
else if (outputFormat === "base64-urlSafe") return (0, $775b7a4456485592$export$2e2bcd8739ae039)(hashBuffer, true);
|
|
1473
1680
|
};
|
|
1474
|
-
var $
|
|
1681
|
+
var $81ab94868fc7e61b$export$2e2bcd8739ae039 = $81ab94868fc7e61b$var$sign;
|
|
1475
1682
|
|
|
1476
1683
|
|
|
1477
1684
|
|
|
1478
|
-
function $
|
|
1685
|
+
function $580b3b65043a36bb$export$96d07f33920abf3e(array, idKey = "id", parentIdKey = "parent_id", sequenceKey = "sequence") {
|
|
1479
1686
|
// Step 1: Create a Map for quick lookup of nodes by their id
|
|
1480
1687
|
const nodeMap = new Map();
|
|
1481
1688
|
// Populate the map
|
|
1482
1689
|
array.forEach((node)=>{
|
|
1483
|
-
nodeMap.set((0, $
|
|
1690
|
+
nodeMap.set((0, $8JZgm$lodash.get)(node, idKey), {
|
|
1484
1691
|
...node,
|
|
1485
1692
|
children: []
|
|
1486
1693
|
});
|
|
@@ -1489,8 +1696,8 @@ function $0a764cc1e9fed37c$export$96d07f33920abf3e(array, idKey = "id", parentId
|
|
|
1489
1696
|
const rootNodes = [];
|
|
1490
1697
|
// Step 3: Organize the nodes into a tree structure
|
|
1491
1698
|
array.forEach((node)=>{
|
|
1492
|
-
const parentId = (0, $
|
|
1493
|
-
const nodeId = (0, $
|
|
1699
|
+
const parentId = (0, $8JZgm$lodash.get)(node, parentIdKey);
|
|
1700
|
+
const nodeId = (0, $8JZgm$lodash.get)(node, idKey);
|
|
1494
1701
|
if (parentId && nodeMap.has(parentId)) // If the parent exists, add the current node as a child
|
|
1495
1702
|
nodeMap.get(parentId)?.children?.push(nodeMap.get(nodeId));
|
|
1496
1703
|
else // Treat it as a root node if the parent doesn't exist or it's null
|
|
@@ -1499,7 +1706,7 @@ function $0a764cc1e9fed37c$export$96d07f33920abf3e(array, idKey = "id", parentId
|
|
|
1499
1706
|
// Step 4: Recursive function to sort nodes and their children
|
|
1500
1707
|
function sortTree(nodes) {
|
|
1501
1708
|
// Sort nodes using lodash by sequence
|
|
1502
|
-
const sortedNodes = (0, $
|
|
1709
|
+
const sortedNodes = (0, $8JZgm$lodash.sortBy)(nodes, sequenceKey);
|
|
1503
1710
|
sortedNodes.forEach((node)=>{
|
|
1504
1711
|
if (node.children && node.children.length > 0) node.children = sortTree(node.children);
|
|
1505
1712
|
});
|
|
@@ -1510,7 +1717,7 @@ function $0a764cc1e9fed37c$export$96d07f33920abf3e(array, idKey = "id", parentId
|
|
|
1510
1717
|
// Step 6: Flatten the sorted tree into an array (keeping the parent-child structure)
|
|
1511
1718
|
function flattenTree(nodes) {
|
|
1512
1719
|
return nodes.reduce((acc, node)=>{
|
|
1513
|
-
acc.push((0, $
|
|
1720
|
+
acc.push((0, $8JZgm$lodash.omit)(node, "children")) // Push the current node without 'children'
|
|
1514
1721
|
;
|
|
1515
1722
|
if (node.children && node.children.length > 0) acc.push(...flattenTree(node.children)) // Recursively flatten children
|
|
1516
1723
|
;
|
|
@@ -1519,44 +1726,44 @@ function $0a764cc1e9fed37c$export$96d07f33920abf3e(array, idKey = "id", parentId
|
|
|
1519
1726
|
}
|
|
1520
1727
|
return flattenTree(sortedTree);
|
|
1521
1728
|
}
|
|
1522
|
-
var $
|
|
1729
|
+
var $580b3b65043a36bb$export$2e2bcd8739ae039 = $580b3b65043a36bb$export$96d07f33920abf3e;
|
|
1523
1730
|
|
|
1524
1731
|
|
|
1525
1732
|
|
|
1526
|
-
function $
|
|
1527
|
-
return (0, ($parcel$interopDefault($
|
|
1733
|
+
function $d06da9f395a7a8fb$export$2e2bcd8739ae039(query, options) {
|
|
1734
|
+
return (0, ($parcel$interopDefault($8JZgm$qs))).stringify(query, options);
|
|
1528
1735
|
}
|
|
1529
1736
|
|
|
1530
1737
|
|
|
1531
|
-
async function $
|
|
1738
|
+
async function $388ca1eb55f02edf$var$teeStream(stream) {
|
|
1532
1739
|
return stream.tee();
|
|
1533
1740
|
}
|
|
1534
|
-
var $
|
|
1741
|
+
var $388ca1eb55f02edf$export$2e2bcd8739ae039 = $388ca1eb55f02edf$var$teeStream;
|
|
1535
1742
|
|
|
1536
1743
|
|
|
1537
1744
|
|
|
1538
|
-
function $
|
|
1539
|
-
return (0, $
|
|
1745
|
+
function $e75daec31553a3b3$var$toNumber(value) {
|
|
1746
|
+
return (0, $8JZgm$lodash.toNumber)(value);
|
|
1540
1747
|
}
|
|
1541
|
-
var $
|
|
1748
|
+
var $e75daec31553a3b3$export$2e2bcd8739ae039 = $e75daec31553a3b3$var$toNumber;
|
|
1542
1749
|
|
|
1543
1750
|
|
|
1544
|
-
function $
|
|
1751
|
+
function $a023eb3d4a251906$var$uuid() {
|
|
1545
1752
|
return crypto.randomUUID();
|
|
1546
1753
|
}
|
|
1547
|
-
var $
|
|
1754
|
+
var $a023eb3d4a251906$export$2e2bcd8739ae039 = $a023eb3d4a251906$var$uuid;
|
|
1548
1755
|
|
|
1549
1756
|
|
|
1550
1757
|
|
|
1551
|
-
function $
|
|
1758
|
+
function $ca576708603a0375$export$2e2bcd8739ae039(xml, options = {
|
|
1552
1759
|
compact: true,
|
|
1553
1760
|
spaces: 4
|
|
1554
1761
|
}) {
|
|
1555
|
-
return (0, $
|
|
1762
|
+
return (0, $8JZgm$xmljs.xml2js)(xml, options);
|
|
1556
1763
|
}
|
|
1557
1764
|
|
|
1558
1765
|
|
|
1559
|
-
function $
|
|
1766
|
+
function $4ce9fabd9c4c00da$var$zipSqlResponse(columns, data, key) {
|
|
1560
1767
|
// @ts-ignore
|
|
1561
1768
|
const columnKeys = columns.map((col)=>col[key]);
|
|
1562
1769
|
// @ts-ignore
|
|
@@ -1567,109 +1774,109 @@ function $9cdb7c76a5e196f3$var$zipSqlResponse(columns, data, key) {
|
|
|
1567
1774
|
return obj;
|
|
1568
1775
|
});
|
|
1569
1776
|
}
|
|
1570
|
-
var $
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
function $
|
|
1574
|
-
expression.registerFunction("dtFromIso", (0, $
|
|
1575
|
-
expression.registerFunction("base64decode", (0, $
|
|
1576
|
-
expression.registerFunction("base64encode", (0, $
|
|
1577
|
-
expression.registerFunction("base64ToBlob", (0, $
|
|
1578
|
-
expression.registerFunction("dtFromFormat", (0, $
|
|
1579
|
-
expression.registerFunction("removeEmpty", (0, $
|
|
1580
|
-
expression.registerFunction("removeEmptyItems", (0, $
|
|
1581
|
-
expression.registerFunction("convertCurrencyToSubunit", (0, $
|
|
1582
|
-
expression.registerFunction("convertCurrencyFromSubunit", (0, $
|
|
1583
|
-
expression.registerFunction("convertQueryToSql", (0, $
|
|
1584
|
-
expression.registerFunction("mapValues", (0, $
|
|
1585
|
-
expression.registerFunction("zipSqlResponse", (0, $
|
|
1586
|
-
expression.registerFunction("firstNonEmpty", (0, $
|
|
1587
|
-
expression.registerFunction("convertNotionToMd", (0, $
|
|
1588
|
-
expression.registerFunction("convertNotionToMarkdown", (0, $
|
|
1589
|
-
expression.registerFunction("convertMarkdownToGoogleDocs", (0, $
|
|
1590
|
-
expression.registerFunction("convertMarkdownToNotion", (0, $
|
|
1591
|
-
expression.registerFunction("convertMarkdownToSlack", (0, $
|
|
1592
|
-
expression.registerFunction("parseUrl", (0, $
|
|
1777
|
+
var $4ce9fabd9c4c00da$export$2e2bcd8739ae039 = $4ce9fabd9c4c00da$var$zipSqlResponse;
|
|
1778
|
+
|
|
1779
|
+
|
|
1780
|
+
function $5bade4df0ac35cf5$export$2e2bcd8739ae039(expression) {
|
|
1781
|
+
expression.registerFunction("dtFromIso", (0, $c69f207ac6d23ec9$export$2e2bcd8739ae039));
|
|
1782
|
+
expression.registerFunction("base64decode", (0, $0e491578bc1ae22a$export$2e2bcd8739ae039));
|
|
1783
|
+
expression.registerFunction("base64encode", (0, $8d03c5df5e0a89ca$export$2e2bcd8739ae039));
|
|
1784
|
+
expression.registerFunction("base64ToBlob", (0, $8893c1da97a40f3f$export$2e2bcd8739ae039));
|
|
1785
|
+
expression.registerFunction("dtFromFormat", (0, $b705f929f872f04a$export$2e2bcd8739ae039));
|
|
1786
|
+
expression.registerFunction("removeEmpty", (0, $46d8c3f9d4f3a84d$export$2e2bcd8739ae039));
|
|
1787
|
+
expression.registerFunction("removeEmptyItems", (0, $89073b7697efe215$export$2e2bcd8739ae039));
|
|
1788
|
+
expression.registerFunction("convertCurrencyToSubunit", (0, $121dda924db9fd19$export$2e2bcd8739ae039));
|
|
1789
|
+
expression.registerFunction("convertCurrencyFromSubunit", (0, $aefb52ddb83a7a81$export$2e2bcd8739ae039));
|
|
1790
|
+
expression.registerFunction("convertQueryToSql", (0, $30e62e8c4ba4c451$export$2e2bcd8739ae039));
|
|
1791
|
+
expression.registerFunction("mapValues", (0, $b093023fe7f4f0a3$export$2e2bcd8739ae039));
|
|
1792
|
+
expression.registerFunction("zipSqlResponse", (0, $4ce9fabd9c4c00da$export$2e2bcd8739ae039));
|
|
1793
|
+
expression.registerFunction("firstNonEmpty", (0, $b1d8f4990aab4108$export$2e2bcd8739ae039));
|
|
1794
|
+
expression.registerFunction("convertNotionToMd", (0, $2d4e342e27d0a138$export$2e2bcd8739ae039));
|
|
1795
|
+
expression.registerFunction("convertNotionToMarkdown", (0, $24e1f903aef46c44$export$2e2bcd8739ae039));
|
|
1796
|
+
expression.registerFunction("convertMarkdownToGoogleDocs", (0, $62a670ce81736b3d$export$2e2bcd8739ae039));
|
|
1797
|
+
expression.registerFunction("convertMarkdownToNotion", (0, $8252f21cc2f7f340$export$2e2bcd8739ae039));
|
|
1798
|
+
expression.registerFunction("convertMarkdownToSlack", (0, $8d24b15cb35479b5$export$2e2bcd8739ae039));
|
|
1799
|
+
expression.registerFunction("parseUrl", (0, $5fa5a84ddddfceec$export$2e2bcd8739ae039));
|
|
1593
1800
|
expression.registerFunction("difference", function(arr1, arr2) {
|
|
1594
|
-
return (0, $
|
|
1801
|
+
return (0, $8JZgm$lodash.difference)(arr1, arr2);
|
|
1595
1802
|
});
|
|
1596
|
-
expression.registerFunction("toNumber", (0, $
|
|
1597
|
-
expression.registerFunction("jsonParse", (0, $
|
|
1598
|
-
expression.registerFunction("getMimeType", (0, $
|
|
1599
|
-
expression.registerFunction("uuid", (0, $
|
|
1600
|
-
expression.registerFunction("getArrayBuffer", (0, $
|
|
1601
|
-
expression.registerFunction("mostSimilar", (0, $
|
|
1602
|
-
expression.registerFunction("sortNodes", (0, $
|
|
1603
|
-
expression.registerFunction("blob", (0, $
|
|
1604
|
-
expression.registerFunction("convertHtmlToMarkdown", (0, $
|
|
1605
|
-
expression.registerFunction("convertMarkdownToHtml", (0, $
|
|
1606
|
-
expression.registerFunction("digest", (0, $
|
|
1607
|
-
expression.registerFunction("sign", (0, $
|
|
1608
|
-
expression.registerFunction("xmlToJs", (0, $
|
|
1609
|
-
expression.registerFunction("jsToXml", (0, $
|
|
1610
|
-
expression.registerFunction("generateEmbeddingsCohere", (0, $
|
|
1803
|
+
expression.registerFunction("toNumber", (0, $e75daec31553a3b3$export$2e2bcd8739ae039));
|
|
1804
|
+
expression.registerFunction("jsonParse", (0, $408f03f4788a3418$export$2e2bcd8739ae039));
|
|
1805
|
+
expression.registerFunction("getMimeType", (0, $f79bdc02a50f4d01$export$2e2bcd8739ae039));
|
|
1806
|
+
expression.registerFunction("uuid", (0, $a023eb3d4a251906$export$2e2bcd8739ae039));
|
|
1807
|
+
expression.registerFunction("getArrayBuffer", (0, $ccba597b054a97f2$export$2e2bcd8739ae039));
|
|
1808
|
+
expression.registerFunction("mostSimilar", (0, $0499a1669d807cf8$export$2e2bcd8739ae039));
|
|
1809
|
+
expression.registerFunction("sortNodes", (0, $580b3b65043a36bb$export$2e2bcd8739ae039));
|
|
1810
|
+
expression.registerFunction("blob", (0, $2d72eb3f05b5e1e5$export$2e2bcd8739ae039));
|
|
1811
|
+
expression.registerFunction("convertHtmlToMarkdown", (0, $609a3a0e109e1552$export$2e2bcd8739ae039));
|
|
1812
|
+
expression.registerFunction("convertMarkdownToHtml", (0, $7d5587e1c5f3ad11$export$2e2bcd8739ae039));
|
|
1813
|
+
expression.registerFunction("digest", (0, $29efd9e603b1d9b3$export$2e2bcd8739ae039));
|
|
1814
|
+
expression.registerFunction("sign", (0, $81ab94868fc7e61b$export$2e2bcd8739ae039));
|
|
1815
|
+
expression.registerFunction("xmlToJs", (0, $ca576708603a0375$export$2e2bcd8739ae039));
|
|
1816
|
+
expression.registerFunction("jsToXml", (0, $f0a9eba86693900f$export$2e2bcd8739ae039));
|
|
1817
|
+
expression.registerFunction("generateEmbeddingsCohere", (0, $b98e369677054b00$export$2e2bcd8739ae039));
|
|
1611
1818
|
expression.registerFunction("groupBy", function(array, key) {
|
|
1612
|
-
return (0, $
|
|
1819
|
+
return (0, $8JZgm$lodash.groupBy)((0, $8JZgm$lodash.castArray)(array), key);
|
|
1613
1820
|
});
|
|
1614
1821
|
expression.registerFunction("keyBy", function(array, key) {
|
|
1615
|
-
return (0, $
|
|
1822
|
+
return (0, $8JZgm$lodash.keyBy)((0, $8JZgm$lodash.castArray)(array), key);
|
|
1616
1823
|
});
|
|
1617
1824
|
expression.registerFunction("pick", function(obj, keys) {
|
|
1618
|
-
return (0, $
|
|
1825
|
+
return (0, $8JZgm$lodash.pick)(obj, keys);
|
|
1619
1826
|
});
|
|
1620
1827
|
expression.registerFunction("omit", function(obj, keys) {
|
|
1621
|
-
return (0, $
|
|
1828
|
+
return (0, $8JZgm$lodash.omit)(obj, keys);
|
|
1622
1829
|
});
|
|
1623
1830
|
expression.registerFunction("compact", function(arr) {
|
|
1624
|
-
return (0, $
|
|
1831
|
+
return (0, $8JZgm$lodash.compact)((0, $8JZgm$lodash.castArray)(arr));
|
|
1625
1832
|
});
|
|
1626
1833
|
expression.registerFunction("join", function(arr, separator) {
|
|
1627
|
-
return (0, $
|
|
1834
|
+
return (0, $8JZgm$lodash.join)((0, $8JZgm$lodash.castArray)(arr), separator);
|
|
1628
1835
|
});
|
|
1629
1836
|
expression.registerFunction("orderBy", function(arr, attr, order) {
|
|
1630
|
-
return (0, $
|
|
1837
|
+
return (0, $8JZgm$lodash.orderBy)((0, $8JZgm$lodash.castArray)(arr), attr, order);
|
|
1631
1838
|
});
|
|
1632
1839
|
expression.registerFunction("find", function(arr, attr) {
|
|
1633
|
-
return (0, $
|
|
1840
|
+
return (0, $8JZgm$lodash.find)((0, $8JZgm$lodash.castArray)(arr), attr);
|
|
1634
1841
|
});
|
|
1635
1842
|
expression.registerFunction("lofilter", function(arr, attr) {
|
|
1636
|
-
return (0, $
|
|
1843
|
+
return (0, $8JZgm$lodash.filter)((0, $8JZgm$lodash.castArray)(arr), attr);
|
|
1637
1844
|
});
|
|
1638
1845
|
expression.registerFunction("values", function(obj) {
|
|
1639
|
-
return (0, $
|
|
1846
|
+
return (0, $8JZgm$lodash.values)(obj);
|
|
1640
1847
|
});
|
|
1641
1848
|
expression.registerFunction("chunk", function(arr, size) {
|
|
1642
|
-
return (0, $
|
|
1849
|
+
return (0, $8JZgm$lodash.chunk)((0, $8JZgm$lodash.castArray)(arr), size);
|
|
1643
1850
|
});
|
|
1644
1851
|
expression.registerFunction("wrap", function(value, wrapper, endWrapper) {
|
|
1645
|
-
return (0, $
|
|
1852
|
+
return (0, $8JZgm$lodash.join)([
|
|
1646
1853
|
wrapper,
|
|
1647
1854
|
value,
|
|
1648
1855
|
endWrapper || wrapper
|
|
1649
1856
|
], "");
|
|
1650
1857
|
});
|
|
1651
|
-
expression.registerFunction("parseDocument", (0, $
|
|
1652
|
-
expression.registerFunction("recursiveCharacterTextSplitter", (0, $
|
|
1653
|
-
expression.registerFunction("getDataUri", (0, $
|
|
1654
|
-
expression.registerFunction("teeStream", (0, $
|
|
1655
|
-
expression.registerFunction("bufferToString", (0, $
|
|
1656
|
-
expression.registerFunction("parseQuery", (0, $
|
|
1657
|
-
expression.registerFunction("stringifyQuery", (0, $
|
|
1858
|
+
expression.registerFunction("parseDocument", (0, $8bd834eb1e3f8e3b$export$2e2bcd8739ae039));
|
|
1859
|
+
expression.registerFunction("recursiveCharacterTextSplitter", (0, $b566d11c5b9df7cf$export$e600492876ee595b));
|
|
1860
|
+
expression.registerFunction("getDataUri", (0, $da697c8f5d45fcb8$export$2e2bcd8739ae039));
|
|
1861
|
+
expression.registerFunction("teeStream", (0, $388ca1eb55f02edf$export$2e2bcd8739ae039));
|
|
1862
|
+
expression.registerFunction("bufferToString", (0, $218d624cd15398df$export$2e2bcd8739ae039));
|
|
1863
|
+
expression.registerFunction("parseQuery", (0, $64d027222fb6f315$export$2e2bcd8739ae039));
|
|
1864
|
+
expression.registerFunction("stringifyQuery", (0, $d06da9f395a7a8fb$export$2e2bcd8739ae039));
|
|
1658
1865
|
expression.registerFunction("flatten", function(arr) {
|
|
1659
|
-
return (0, $
|
|
1866
|
+
return (0, $8JZgm$lodash.flatten)((0, $8JZgm$lodash.castArray)(arr));
|
|
1660
1867
|
});
|
|
1661
1868
|
expression.registerFunction("flattenDeep", function(arr) {
|
|
1662
|
-
return (0, $
|
|
1869
|
+
return (0, $8JZgm$lodash.flattenDeep)((0, $8JZgm$lodash.castArray)(arr));
|
|
1663
1870
|
});
|
|
1664
1871
|
expression.registerFunction("flattenDepth", function(arr, depth) {
|
|
1665
|
-
return (0, $
|
|
1872
|
+
return (0, $8JZgm$lodash.flattenDepth)((0, $8JZgm$lodash.castArray)(arr), depth);
|
|
1666
1873
|
});
|
|
1667
1874
|
return expression;
|
|
1668
1875
|
}
|
|
1669
1876
|
|
|
1670
1877
|
|
|
1671
|
-
function $
|
|
1672
|
-
return (0, $
|
|
1878
|
+
function $bda2bff6fd99c84f$export$2e2bcd8739ae039(expression) {
|
|
1879
|
+
return (0, $5bade4df0ac35cf5$export$2e2bcd8739ae039)((0, ($parcel$interopDefault($8JZgm$jsonata)))(expression));
|
|
1673
1880
|
}
|
|
1674
1881
|
|
|
1675
1882
|
|