Socket
Socket
Sign inDemoInstall

@hebcal/rest-api

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hebcal/rest-api - npm Package Compare versions

Comparing version 4.3.5 to 4.3.6

69

dist/fullcalendar.js

@@ -1,2 +0,2 @@

/*! @hebcal/rest-api v4.3.5 */
/*! @hebcal/rest-api v4.3.6 */
var hebcalFullCalendar = (function (exports, core, leyning) {

@@ -11,3 +11,2 @@ 'use strict';

*/
function pad2(number) {

@@ -17,5 +16,5 @@ if (number < 10) {

}
return '' + number;
}
/**

@@ -25,3 +24,2 @@ * @param {number} number

*/
function pad4(number) {

@@ -37,5 +35,5 @@ if (number < 0) {

}
return '' + number;
}
/**

@@ -46,8 +44,9 @@ * Returns just the date portion as YYYY-MM-DD

*/
function toISOString(d) {
return pad4(d.getFullYear()) + '-' + pad2(d.getMonth() + 1) + '-' + pad2(d.getDate());
}
var flagToCategory = [[core.flags.MAJOR_FAST, 'holiday', 'major', 'fast'], [core.flags.CHANUKAH_CANDLES, 'holiday', 'major'], [core.flags.DAF_YOMI, 'dafyomi'], [core.flags.HEBREW_DATE, 'hebdate'], [core.flags.MINOR_FAST, 'holiday', 'fast'], [core.flags.MINOR_HOLIDAY, 'holiday', 'minor'], [core.flags.MISHNA_YOMI, 'mishnayomi'], [core.flags.MODERN_HOLIDAY, 'holiday', 'modern'], [core.flags.MOLAD, 'molad'], [core.flags.OMER_COUNT, 'omer'], [core.flags.PARSHA_HASHAVUA, 'parashat'], // backwards-compat
var flagToCategory = [[core.flags.MAJOR_FAST, 'holiday', 'major', 'fast'], [core.flags.CHANUKAH_CANDLES, 'holiday', 'major'], [core.flags.DAF_YOMI, 'dafyomi'], [core.flags.HEBREW_DATE, 'hebdate'], [core.flags.MINOR_FAST, 'holiday', 'fast'], [core.flags.MINOR_HOLIDAY, 'holiday', 'minor'], [core.flags.MISHNA_YOMI, 'mishnayomi'], [core.flags.MODERN_HOLIDAY, 'holiday', 'modern'], [core.flags.MOLAD, 'molad'], [core.flags.OMER_COUNT, 'omer'], [core.flags.PARSHA_HASHAVUA, 'parashat'],
// backwards-compat
[core.flags.ROSH_CHODESH, 'roshchodesh'], [core.flags.SHABBAT_MEVARCHIM, 'mevarchim'], [core.flags.SPECIAL_SHABBAT, 'holiday', 'shabbat'], [core.flags.USER_EVENT, 'user']];
/**

@@ -58,6 +57,4 @@ * Returns a category and subcategory name

*/
function getEventCategories(ev) {
var desc = ev.getDesc();
switch (desc) {

@@ -68,7 +65,5 @@ // LIGHT_CANDLES or LIGHT_CANDLES_TZEIS

// YOM_TOV_ENDS
case 'Havdalah':
return ['havdalah'];
// flags.MINOR_FAST or flags.MAJOR_FAST
case 'Fast begins':

@@ -78,18 +73,13 @@ case 'Fast ends':

}
if (ev.cholHaMoedDay) {
return ['holiday', 'major', 'cholhamoed'];
}
var mask = ev.getFlags();
for (var i = 0; i < flagToCategory.length; i++) {
var attrs = flagToCategory[i];
if (mask & attrs[0]) {
return attrs.slice(1);
}
} // Don't depend on flags.MINOR_HOLIDAY always being set
}
// Don't depend on flags.MINOR_HOLIDAY always being set
switch (desc) {

@@ -106,3 +96,2 @@ case 'Lag BaOmer':

return ['holiday', 'minor'];
default:

@@ -113,2 +102,3 @@ return ['holiday', 'major'];

var HOLIDAY_IGNORE_MASK = core.flags.DAF_YOMI | core.flags.OMER_COUNT | core.flags.SHABBAT_MEVARCHIM | core.flags.MOLAD | core.flags.USER_EVENT | core.flags.HEBREW_DATE;
/**

@@ -120,13 +110,11 @@ * Makes mulit-line text that summarizes Torah & Haftarah

*/
function makeTorahMemoText(ev, il) {
var mask = ev.getFlags();
if (mask & HOLIDAY_IGNORE_MASK) {
return '';
} else if (typeof ev.eventTime !== 'undefined') {
return '';
}
var reading = mask & core.flags.PARSHA_HASHAVUA ? leyning.getLeyningForParshaHaShavua(ev, il) : leyning.getLeyningForHoliday(ev, il);
var memo = '';
if (reading && (reading.summary || reading.haftara)) {

@@ -136,10 +124,7 @@ if (reading.summary) {

}
if (reading.summary && reading.haftara) {
memo += '\n';
}
if (reading.haftara) {
memo += 'Haftarah: ' + reading.haftara;
if (reading.reason && reading.reason.haftara) {

@@ -150,9 +135,8 @@ memo += ' | ' + reading.reason.haftara;

}
if (reading && reading.sephardic) {
memo += '\nHaftarah for Sephardim: ' + reading.sephardic;
}
return memo;
}
/**

@@ -167,7 +151,5 @@ * Appends utm_source and utm_medium parameters to a URL

*/
function appendIsraelAndTracking(url, il, utmSource, utmMedium, utmCampaign) {
var u = new URL(url);
var isHebcal = u.host === 'www.hebcal.com';
if (isHebcal) {

@@ -177,3 +159,2 @@ if (il) {

}
var path = u.pathname;

@@ -183,6 +164,4 @@ var isHolidays = path.startsWith('/holidays/');

var isOmer = path.startsWith('/omer/');
if (isHolidays || isSedrot || isOmer) {
u.host = 'hebcal.com';
if (isHolidays) {

@@ -196,3 +175,2 @@ u.pathname = '/h/' + path.substring(10);

}
if (!utmCampaign || !(utmCampaign.startsWith('ical-') || utmCampaign.startsWith('pdf-'))) {

@@ -202,3 +180,2 @@ if (utmSource) {

}
if (utmMedium) {

@@ -208,27 +185,21 @@ u.searchParams.set('um', utmMedium);

}
if (utmCampaign) {
u.searchParams.set('uc', utmCampaign);
}
return u.toString();
}
}
utmSource = isHebcal ? utmSource : 'hebcal.com';
if (utmSource) {
u.searchParams.set('utm_source', utmSource);
}
if (utmMedium) {
u.searchParams.set('utm_medium', utmMedium);
}
if (utmCampaign) {
u.searchParams.set('utm_campaign', utmCampaign);
}
return u.toString();
}
/**

@@ -239,7 +210,5 @@ * @private

*/
function shouldRenderBrief(ev) {
if (typeof ev.eventTime !== 'undefined') return true;
var mask = ev.getFlags();
if (mask & core.flags.HEBREW_DATE) {

@@ -266,11 +235,8 @@ var hd = ev.getDate();

*/
function eventToFullCalendar(ev, tzid, il) {
var classes = getEventCategories(ev);
var mask = ev.getFlags();
if (classes[0] == 'holiday' && mask & core.flags.CHAG) {
classes.push('yomtov');
}
var timed = Boolean(ev.eventTime);

@@ -286,19 +252,13 @@ var title = shouldRenderBrief(ev) ? ev.renderBrief() : ev.render();

var hebrew = ev.renderBrief('he');
if (hebrew) {
result.hebrew = core.Locale.hebrewStripNikkud(hebrew);
}
var url = ev.url();
if (url) {
result.url = appendIsraelAndTracking(url, il, 'js', 'fc');
}
var desc = ev.getDesc();
var candles = desc === 'Havdalah' || desc === 'Candle lighting';
if (!candles) {
var memo = mask & core.flags.PARSHA_HASHAVUA ? makeTorahMemoText(ev, il) : ev.memo || holidayDescription[ev.basename()];
if (memo) {

@@ -310,3 +270,2 @@ result.description = memo;

}
return result;

@@ -317,6 +276,4 @@ }

Object.defineProperty(exports, '__esModule', { value: true });
return exports;
})({}, hebcal, hebcal__leyning);

4

dist/fullcalendar.min.js

@@ -1,2 +0,2 @@

/*! @hebcal/rest-api v4.3.5 */
var hebcalFullCalendar=function(e,a,o){"use strict";var r={"Asara B'Tevet":"Fast commemorating the siege of Jerusalem","Ben-Gurion Day":"Commemorates the life and vision of Israel's first Prime Minister David Ben-Gurion","Birkat Hachamah":"A rare Jewish blessing recited once every 28 years thanking G-d for creating the sun",Chanukah:"Hanukkah, the Jewish festival of rededication. Also known as the Festival of Lights","Days of the Omer":"7 weeks from the second night of Pesach to the day before Shavuot","Family Day":"Yom HaMishpacha, a day to honor the family unit, as a whole, and its centrality to our lives","Herzl Day":"Commemorates the life and vision of Zionist leader Theodor Herzl","Jabotinsky Day":"Commemorates the life and vision of Zionist leader Ze'ev Jabotinsky","Lag BaOmer":"33rd day of counting the Omer","Leil Selichot":"Prayers for forgiveness in preparation for the High Holidays","Pesach Sheni":"Second Passover, one month after Passover",Pesach:"Passover, the Feast of Unleavened Bread. Also called Chag HaMatzot (the Festival of Matzah), it commemorates the Exodus and freedom of the Israelites from ancient Egypt","Purim Katan":"Minor Purim celebration during Adar I on leap years",Purim:"Celebration of Jewish deliverance as told by Megilat Esther. It commemorates a time when the Jewish people living in Persia were saved from extermination","Purim Meshulash":"Triple Purim, spanning 3 days in Jerusalem and walled cities. It occurs when the 15th of Adar coincides with Shabbat","Rosh Chodesh Nisan":"Start of month of Nisan on the Hebrew calendar. נִיסָן (transliterated Nisan or Nissan) is the 1st month of the Hebrew year, has 30 days, and corresponds to March or April on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Iyyar":"Start of month of Iyyar on the Hebrew calendar. אִיָיר (transliterated Iyyar or Iyar) is the 2nd month of the Hebrew year, has 29 days, and corresponds to April or May on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Sivan":"Start of month of Sivan on the Hebrew calendar. Sivan (סִיוָן) is the 3rd month of the Hebrew year, has 30 days, and corresponds to May or June on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Tamuz":"Start of month of Tamuz on the Hebrew calendar. תַּמּוּז (transliterated Tamuz or Tammuz) is the 4th month of the Hebrew year, has 29 days, and corresponds to June or July on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Av":"Start of month of Av on the Hebrew calendar. Av (אָב) is the 5th month of the Hebrew year, has 30 days, and corresponds to July or August on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Elul":"Start of month of Elul on the Hebrew calendar. Elul (אֱלוּל) is the 6th month of the Hebrew year, has 29 days, and corresponds to August or September on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Cheshvan":"Start of month of Cheshvan on the Hebrew calendar. חֶשְׁוָן (transliterated Cheshvan or Heshvan) is the 8th month of the Hebrew year, has 29 or 30 days, and corresponds to October or November on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Kislev":"Start of month of Kislev on the Hebrew calendar. Kislev (כִּסְלֵו) is the 9th month of the Hebrew year, has 30 or 29 days, and corresponds to November or December on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Tevet":"Start of month of Tevet on the Hebrew calendar. Tevet (טֵבֵת) is the 10th month of the Hebrew year, has 29 days, and corresponds to December or January on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Sh'vat":"Start of month of Sh'vat on the Hebrew calendar. שְׁבָט (transliterated Sh'vat or Shevat) is the 11th month of the Hebrew year, has 30 days, and corresponds to January or February on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar":"Start of month of Adar on the Hebrew calendar. Adar (אַדָר) is the 12th month of the Hebrew year, has 29 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar I":"Start of month of Adar I (on leap years) on the Hebrew calendar. Adar I (אַדָר א׳) is the 12th month of the Hebrew year, occurs only on leap years, has 30 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar II":'Start of month of Adar II (on leap years) on the Hebrew calendar. Adar II (אַדָר ב׳), sometimes "Adar Bet" or "Adar Sheni", is the 13th month of the Hebrew year, has 29 days, occurs only on leap years, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon',"Rosh Hashana":"The Jewish New Year. Also spelled Rosh Hashanah","Rosh Hashana LaBehemot":"New Year for Tithing Animals","Shabbat Chazon":"Shabbat before Tish'a B'Av (Shabbat of Prophecy/Shabbat of Vision)","Shabbat HaChodesh":"Shabbat before Rosh Chodesh Nissan","Shabbat HaGadol":"Shabbat before Pesach","Shabbat Machar Chodesh":"When Shabbat falls the day before Rosh Chodesh","Shabbat Nachamu":"Shabbat after Tish'a B'Av (Shabbat of Consolation). The first of seven Shabbatot leading up to Rosh Hashanah. Named after the Haftarah (from Isaiah 40) which begins with the verse נַחֲמוּ נַחֲמוּ, עַמִּי (\"Comfort, oh comfort my people\")","Shabbat Parah":"Shabbat of the Red Heifer","Shabbat Rosh Chodesh":"When Shabbat falls on Rosh Chodesh","Shabbat Shekalim":"Shabbat before Rosh Chodesh Adar","Shabbat Shirah":"Shabbat of Song","Shabbat Shuva":"Shabbat that falls between Rosh Hashanah and Yom Kippur (Shabbat of Returning)","Shabbat Zachor":"Shabbat before Purim",Shavuot:"Festival of Weeks. Commemorates the giving of the Torah at Mount Sinai","Shmini Atzeret":"Eighth Day of Assembly","Shushan Purim":"Purim celebrated in Jerusalem and walled cities","Shushan Purim Katan":"Minor Purim celebration during Adar I on leap years in Jerusalem and walled cities",Sigd:"Ethiopian Jewish holiday occurring 50 days after Yom Kippur","Simchat Torah":"Day of Celebrating the Torah",Sukkot:"Feast of Booths","Ta'anit Bechorot":"Fast of the First Born","Ta'anit Esther":"Fast of Esther","Tish'a B'Av":"The Ninth of Av. Fast commemorating the destruction of the two Temples","Tu B'Av":"Minor Jewish holiday of love. Observed on the 15th day of the Hebrew month of Av","Tu BiShvat":"New Year for Trees","Tzom Gedaliah":"Fast of the Seventh Month. Commemorates the assassination of the Jewish governor of Judah","Tzom Tammuz":"Fast commemorating breaching of the walls of Jerusalem before the destruction of the Second Temple","Yitzhak Rabin Memorial Day":"Commemorates the life of Israeli Prime Minister Yitzhak Rabin","Yom HaAliyah":"Recognizes Aliyah, immigration to the Jewish State of Israel","Yom HaAliyah School Observance":"Aliyah Day observed in Israeli schools","Yom HaAtzma'ut":"Israeli Independence Day. Commemorates the declaration of independence of Israel in 1948. Although Yom HaAtzma'ut is normally observed on the 5th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaZikaron, which always precedes it) would conflict with Shabbat","Yom HaShoah":"Holocaust Memorial Day","Yom HaZikaron":"Israeli Memorial Day. Remembers those who died in the War of Independence and other wars in Israel. The full name of the holiday is Yom HaZikaron LeHalalei Ma'arakhot Yisrael ul'Nifge'ei Pe'ulot HaEivah (Hebrew: יוֹם הזִּכָּרוֹן לְחַלְלֵי מַעֲרָכוֹת יִשְׂרָאֵל וּלְנִפְגְעֵי פְּעֻלּוֹת הָאֵיבָה), Memorial Day for the Fallen Soldiers of the Wars of Israel and Victims of Actions of Terrorism. Although Yom Hazikaron is normally observed on the 4th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaAtzma'ut, which always follows it) would conflict with Shabbat","Yom Kippur":"Day of Atonement","Yom Kippur Katan":"Minor day of atonement occurring monthly on the day preceeding each Rosh Chodesh","Yom Yerushalayim":"Jerusalem Day. Commemorates the re-unification of Jerusalem in 1967"};function t(e){return e<10?"0"+e:""+e}function h(e){return e<0?"-00"+h(-e):e<10?"000"+e:e<100?"00"+e:e<1e3?"0"+e:""+e}function s(e){return h(e.getFullYear())+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())}var n=[[a.flags.MAJOR_FAST,"holiday","major","fast"],[a.flags.CHANUKAH_CANDLES,"holiday","major"],[a.flags.DAF_YOMI,"dafyomi"],[a.flags.HEBREW_DATE,"hebdate"],[a.flags.MINOR_FAST,"holiday","fast"],[a.flags.MINOR_HOLIDAY,"holiday","minor"],[a.flags.MISHNA_YOMI,"mishnayomi"],[a.flags.MODERN_HOLIDAY,"holiday","modern"],[a.flags.MOLAD,"molad"],[a.flags.OMER_COUNT,"omer"],[a.flags.PARSHA_HASHAVUA,"parashat"],[a.flags.ROSH_CHODESH,"roshchodesh"],[a.flags.SHABBAT_MEVARCHIM,"mevarchim"],[a.flags.SPECIAL_SHABBAT,"holiday","shabbat"],[a.flags.USER_EVENT,"user"]];var i=a.flags.DAF_YOMI|a.flags.OMER_COUNT|a.flags.SHABBAT_MEVARCHIM|a.flags.MOLAD|a.flags.USER_EVENT|a.flags.HEBREW_DATE;return e.eventToFullCalendar=function(e,t,h){var d=function(e){var a=e.getDesc();switch(a){case"Candle lighting":return["candles"];case"Havdalah":return["havdalah"];case"Fast begins":case"Fast ends":return["zmanim","fast"]}if(e.cholHaMoedDay)return["holiday","major","cholhamoed"];for(var o=e.getFlags(),r=0;r<n.length;r++){var t=n[r];if(o&t[0])return t.slice(1)}switch(a){case"Lag BaOmer":case"Leil Selichot":case"Pesach Sheni":case"Erev Purim":case"Purim Katan":case"Shushan Purim":case"Tu B'Av":case"Tu BiShvat":case"Rosh Hashana LaBehemot":return["holiday","minor"];default:return["holiday","major"]}}(e),l=e.getFlags();"holiday"==d[0]&&l&a.flags.CHAG&&d.push("yomtov");var m=Boolean(e.eventTime),f=function(e){if(void 0!==e.eventTime)return!0;var o=e.getFlags();return o&a.flags.HEBREW_DATE?1!==e.getDate().getDate():!!(o&a.flags.DAF_YOMI)||!!(o&a.flags.MINOR_FAST&&"Yom Kippur Katan"===e.getDesc().substring(0,16))||!!(o&a.flags.SHABBAT_MEVARCHIM)}(e)?e.renderBrief():e.render(),c={title:f,start:m?a.Zmanim.formatISOWithTimeZone(t,e.eventTime):s(e.getDate().greg()),allDay:!m,className:d.join(" ")},b=e.renderBrief("he");b&&(c.hebrew=a.Locale.hebrewStripNikkud(b));var y=e.url();y&&(c.url=function(e,a,o,r,t){var h=new URL(e),s="www.hebcal.com"===h.host;if(s){a&&h.searchParams.set("i","on");var n=h.pathname,i=n.startsWith("/holidays/"),d=n.startsWith("/sedrot/"),l=n.startsWith("/omer/");if(i||d||l)return h.host="hebcal.com",h.pathname=i?"/h/"+n.substring(10):d?"/s/"+n.substring(8):"/o/"+n.substring(6),t&&(t.startsWith("ical-")||t.startsWith("pdf-"))||(o&&h.searchParams.set("us",o),r&&h.searchParams.set("um",r)),t&&h.searchParams.set("uc",t),h.toString()}return(o=s?o:"hebcal.com")&&h.searchParams.set("utm_source",o),r&&h.searchParams.set("utm_medium",r),t&&h.searchParams.set("utm_campaign",t),h.toString()}(y,h,"js","fc"));var u=e.getDesc();if(!("Havdalah"===u||"Candle lighting"===u)){var g=l&a.flags.PARSHA_HASHAVUA?function(e,r){var t=e.getFlags();if(t&i)return"";var h=t&a.flags.PARSHA_HASHAVUA?o.getLeyningForParshaHaShavua(e,r):o.getLeyningForHoliday(e,r),s="";return h&&(h.summary||h.haftara)&&(h.summary&&(s+="Torah: ".concat(h.summary)),h.summary&&h.haftara&&(s+="\n"),h.haftara&&(s+="Haftarah: "+h.haftara,h.reason&&h.reason.haftara&&(s+=" | "+h.reason.haftara))),h&&h.sephardic&&(s+="\nHaftarah for Sephardim: "+h.sephardic),s}(e,h):e.memo||r[e.basename()];g?c.description=g:void 0!==e.linkedEvent&&(c.description=e.linkedEvent.render())}return c},Object.defineProperty(e,"__esModule",{value:!0}),e}({},hebcal,hebcal__leyning);
/*! @hebcal/rest-api v4.3.6 */
var hebcalFullCalendar=function(e,a,o){"use strict";var r={"Asara B'Tevet":"Fast commemorating the siege of Jerusalem","Ben-Gurion Day":"Commemorates the life and vision of Israel's first Prime Minister David Ben-Gurion","Birkat Hachamah":"A rare Jewish blessing recited once every 28 years thanking G-d for creating the sun",Chanukah:"Hanukkah, the Jewish festival of rededication. Also known as the Festival of Lights","Days of the Omer":"7 weeks from the second night of Pesach to the day before Shavuot","Family Day":"Yom HaMishpacha, a day to honor the family unit, as a whole, and its centrality to our lives","Herzl Day":"Commemorates the life and vision of Zionist leader Theodor Herzl","Jabotinsky Day":"Commemorates the life and vision of Zionist leader Ze'ev Jabotinsky","Lag BaOmer":"33rd day of counting the Omer","Leil Selichot":"Prayers for forgiveness in preparation for the High Holidays","Pesach Sheni":"Second Passover, one month after Passover",Pesach:"Passover, the Feast of Unleavened Bread. Also called Chag HaMatzot (the Festival of Matzah), it commemorates the Exodus and freedom of the Israelites from ancient Egypt","Purim Katan":"Minor Purim celebration during Adar I on leap years",Purim:"Celebration of Jewish deliverance as told by Megilat Esther. It commemorates a time when the Jewish people living in Persia were saved from extermination","Purim Meshulash":"Triple Purim, spanning 3 days in Jerusalem and walled cities. It occurs when the 15th of Adar coincides with Shabbat","Rosh Chodesh Nisan":"Start of month of Nisan on the Hebrew calendar. נִיסָן (transliterated Nisan or Nissan) is the 1st month of the Hebrew year, has 30 days, and corresponds to March or April on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Iyyar":"Start of month of Iyyar on the Hebrew calendar. אִיָיר (transliterated Iyyar or Iyar) is the 2nd month of the Hebrew year, has 29 days, and corresponds to April or May on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Sivan":"Start of month of Sivan on the Hebrew calendar. Sivan (סִיוָן) is the 3rd month of the Hebrew year, has 30 days, and corresponds to May or June on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Tamuz":"Start of month of Tamuz on the Hebrew calendar. תַּמּוּז (transliterated Tamuz or Tammuz) is the 4th month of the Hebrew year, has 29 days, and corresponds to June or July on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Av":"Start of month of Av on the Hebrew calendar. Av (אָב) is the 5th month of the Hebrew year, has 30 days, and corresponds to July or August on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Elul":"Start of month of Elul on the Hebrew calendar. Elul (אֱלוּל) is the 6th month of the Hebrew year, has 29 days, and corresponds to August or September on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Cheshvan":"Start of month of Cheshvan on the Hebrew calendar. חֶשְׁוָן (transliterated Cheshvan or Heshvan) is the 8th month of the Hebrew year, has 29 or 30 days, and corresponds to October or November on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Kislev":"Start of month of Kislev on the Hebrew calendar. Kislev (כִּסְלֵו) is the 9th month of the Hebrew year, has 30 or 29 days, and corresponds to November or December on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Tevet":"Start of month of Tevet on the Hebrew calendar. Tevet (טֵבֵת) is the 10th month of the Hebrew year, has 29 days, and corresponds to December or January on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Sh'vat":"Start of month of Sh'vat on the Hebrew calendar. שְׁבָט (transliterated Sh'vat or Shevat) is the 11th month of the Hebrew year, has 30 days, and corresponds to January or February on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar":"Start of month of Adar on the Hebrew calendar. Adar (אַדָר) is the 12th month of the Hebrew year, has 29 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar I":"Start of month of Adar I (on leap years) on the Hebrew calendar. Adar I (אַדָר א׳) is the 12th month of the Hebrew year, occurs only on leap years, has 30 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar II":'Start of month of Adar II (on leap years) on the Hebrew calendar. Adar II (אַדָר ב׳), sometimes "Adar Bet" or "Adar Sheni", is the 13th month of the Hebrew year, has 29 days, occurs only on leap years, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon',"Rosh Hashana":"The Jewish New Year. Also spelled Rosh Hashanah","Rosh Hashana LaBehemot":"New Year for Tithing Animals","Shabbat Chazon":"Shabbat before Tish'a B'Av (Shabbat of Prophecy/Shabbat of Vision)","Shabbat HaChodesh":"Shabbat before Rosh Chodesh Nissan","Shabbat HaGadol":"Shabbat before Pesach","Shabbat Machar Chodesh":"When Shabbat falls the day before Rosh Chodesh","Shabbat Nachamu":"Shabbat after Tish'a B'Av (Shabbat of Consolation). The first of seven Shabbatot leading up to Rosh Hashanah. Named after the Haftarah (from Isaiah 40) which begins with the verse נַחֲמוּ נַחֲמוּ, עַמִּי (\"Comfort, oh comfort my people\")","Shabbat Parah":"Shabbat of the Red Heifer","Shabbat Rosh Chodesh":"When Shabbat falls on Rosh Chodesh","Shabbat Shekalim":"Shabbat before Rosh Chodesh Adar","Shabbat Shirah":"Shabbat of Song","Shabbat Shuva":"Shabbat that falls between Rosh Hashanah and Yom Kippur (Shabbat of Returning)","Shabbat Zachor":"Shabbat before Purim",Shavuot:"Festival of Weeks. Commemorates the giving of the Torah at Mount Sinai","Shmini Atzeret":"Eighth Day of Assembly","Shushan Purim":"Purim celebrated in Jerusalem and walled cities","Shushan Purim Katan":"Minor Purim celebration during Adar I on leap years in Jerusalem and walled cities",Sigd:"Ethiopian Jewish holiday occurring 50 days after Yom Kippur","Simchat Torah":"Day of Celebrating the Torah",Sukkot:"Feast of Booths","Ta'anit Bechorot":"Fast of the First Born","Ta'anit Esther":"Fast of Esther","Tish'a B'Av":"The Ninth of Av. Fast commemorating the destruction of the two Temples","Tu B'Av":"Minor Jewish holiday of love. Observed on the 15th day of the Hebrew month of Av","Tu BiShvat":"New Year for Trees","Tzom Gedaliah":"Fast of the Seventh Month. Commemorates the assassination of the Jewish governor of Judah","Tzom Tammuz":"Fast commemorating breaching of the walls of Jerusalem before the destruction of the Second Temple","Yitzhak Rabin Memorial Day":"Commemorates the life of Israeli Prime Minister Yitzhak Rabin","Yom HaAliyah":"Recognizes Aliyah, immigration to the Jewish State of Israel","Yom HaAliyah School Observance":"Aliyah Day observed in Israeli schools","Yom HaAtzma'ut":"Israeli Independence Day. Commemorates the declaration of independence of Israel in 1948. Although Yom HaAtzma'ut is normally observed on the 5th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaZikaron, which always precedes it) would conflict with Shabbat","Yom HaShoah":"Holocaust Memorial Day","Yom HaZikaron":"Israeli Memorial Day. Remembers those who died in the War of Independence and other wars in Israel. The full name of the holiday is Yom HaZikaron LeHalalei Ma'arakhot Yisrael ul'Nifge'ei Pe'ulot HaEivah (Hebrew: יוֹם הזִּכָּרוֹן לְחַלְלֵי מַעֲרָכוֹת יִשְׂרָאֵל וּלְנִפְגְעֵי פְּעֻלּוֹת הָאֵיבָה), Memorial Day for the Fallen Soldiers of the Wars of Israel and Victims of Actions of Terrorism. Although Yom Hazikaron is normally observed on the 4th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaAtzma'ut, which always follows it) would conflict with Shabbat","Yom Kippur":"Day of Atonement","Yom Kippur Katan":"Minor day of atonement occurring monthly on the day preceeding each Rosh Chodesh","Yom Yerushalayim":"Jerusalem Day. Commemorates the re-unification of Jerusalem in 1967"};function t(e){return e<10?"0"+e:""+e}function h(e){return e<0?"-00"+h(-e):e<10?"000"+e:e<100?"00"+e:e<1e3?"0"+e:""+e}function s(e){return h(e.getFullYear())+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())}var n=[[a.flags.MAJOR_FAST,"holiday","major","fast"],[a.flags.CHANUKAH_CANDLES,"holiday","major"],[a.flags.DAF_YOMI,"dafyomi"],[a.flags.HEBREW_DATE,"hebdate"],[a.flags.MINOR_FAST,"holiday","fast"],[a.flags.MINOR_HOLIDAY,"holiday","minor"],[a.flags.MISHNA_YOMI,"mishnayomi"],[a.flags.MODERN_HOLIDAY,"holiday","modern"],[a.flags.MOLAD,"molad"],[a.flags.OMER_COUNT,"omer"],[a.flags.PARSHA_HASHAVUA,"parashat"],[a.flags.ROSH_CHODESH,"roshchodesh"],[a.flags.SHABBAT_MEVARCHIM,"mevarchim"],[a.flags.SPECIAL_SHABBAT,"holiday","shabbat"],[a.flags.USER_EVENT,"user"]];var i=a.flags.DAF_YOMI|a.flags.OMER_COUNT|a.flags.SHABBAT_MEVARCHIM|a.flags.MOLAD|a.flags.USER_EVENT|a.flags.HEBREW_DATE;return e.eventToFullCalendar=function(e,t,h){var d=function(e){var a=e.getDesc();switch(a){case"Candle lighting":return["candles"];case"Havdalah":return["havdalah"];case"Fast begins":case"Fast ends":return["zmanim","fast"]}if(e.cholHaMoedDay)return["holiday","major","cholhamoed"];for(var o=e.getFlags(),r=0;r<n.length;r++){var t=n[r];if(o&t[0])return t.slice(1)}switch(a){case"Lag BaOmer":case"Leil Selichot":case"Pesach Sheni":case"Erev Purim":case"Purim Katan":case"Shushan Purim":case"Tu B'Av":case"Tu BiShvat":case"Rosh Hashana LaBehemot":return["holiday","minor"];default:return["holiday","major"]}}(e),l=e.getFlags();"holiday"==d[0]&&l&a.flags.CHAG&&d.push("yomtov");var m=Boolean(e.eventTime),f=function(e){if(void 0!==e.eventTime)return!0;var o=e.getFlags();return o&a.flags.HEBREW_DATE?1!==e.getDate().getDate():!!(o&a.flags.DAF_YOMI)||!!(o&a.flags.MINOR_FAST&&"Yom Kippur Katan"===e.getDesc().substring(0,16))||!!(o&a.flags.SHABBAT_MEVARCHIM)}(e)?e.renderBrief():e.render(),c={title:f,start:m?a.Zmanim.formatISOWithTimeZone(t,e.eventTime):s(e.getDate().greg()),allDay:!m,className:d.join(" ")},b=e.renderBrief("he");b&&(c.hebrew=a.Locale.hebrewStripNikkud(b));var y=e.url();y&&(c.url=function(e,a,o,r,t){var h=new URL(e),s="www.hebcal.com"===h.host;if(s){a&&h.searchParams.set("i","on");var n=h.pathname,i=n.startsWith("/holidays/"),d=n.startsWith("/sedrot/"),l=n.startsWith("/omer/");if(i||d||l)return h.host="hebcal.com",h.pathname=i?"/h/"+n.substring(10):d?"/s/"+n.substring(8):"/o/"+n.substring(6),t&&(t.startsWith("ical-")||t.startsWith("pdf-"))||(o&&h.searchParams.set("us",o),r&&h.searchParams.set("um",r)),t&&h.searchParams.set("uc",t),h.toString()}return(o=s?o:"hebcal.com")&&h.searchParams.set("utm_source",o),r&&h.searchParams.set("utm_medium",r),t&&h.searchParams.set("utm_campaign",t),h.toString()}(y,h,"js","fc"));var u=e.getDesc();if(!("Havdalah"===u||"Candle lighting"===u)){var g=l&a.flags.PARSHA_HASHAVUA?function(e,r){var t=e.getFlags();if(t&i)return"";if(void 0!==e.eventTime)return"";var h=t&a.flags.PARSHA_HASHAVUA?o.getLeyningForParshaHaShavua(e,r):o.getLeyningForHoliday(e,r),s="";return h&&(h.summary||h.haftara)&&(h.summary&&(s+="Torah: ".concat(h.summary)),h.summary&&h.haftara&&(s+="\n"),h.haftara&&(s+="Haftarah: "+h.haftara,h.reason&&h.reason.haftara&&(s+=" | "+h.reason.haftara))),h&&h.sephardic&&(s+="\nHaftarah for Sephardim: "+h.sephardic),s}(e,h):e.memo||r[e.basename()];g?c.description=g:void 0!==e.linkedEvent&&(c.description=e.linkedEvent.render())}return c},e}({},hebcal,hebcal__leyning);

@@ -1,6 +0,4 @@

/*! @hebcal/rest-api v4.3.5 */
/*! @hebcal/rest-api v4.3.6 */
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var core = require('@hebcal/core');

@@ -18,3 +16,2 @@ var leyning = require('@hebcal/leyning');

*/
function locationToPlainObj(location) {

@@ -43,2 +40,3 @@ if (typeof location === 'object' && location !== null && typeof location.name === 'string') {

}
/**

@@ -52,6 +50,6 @@ * Helper function to transform a string to make it more usable in a URL or filename.

*/
function makeAnchor(s) {
return s.toLowerCase().replace(/'/g, '').replace(/[^\w]/g, '-').replace(/-+/g, '-').replace(/^-/g, '').replace(/-$/g, '');
}
/**

@@ -61,13 +59,9 @@ * @param {CalOptions} options

*/
function getDownloadFilename(options) {
let fileName = 'hebcal';
if (options.year) {
fileName += '_' + options.year;
if (options.isHebrewYear) {
fileName += 'h';
}
if (options.month) {

@@ -81,3 +75,2 @@ fileName += '_' + options.month;

const y2 = end.greg().getFullYear();
if (y1 === y2) {

@@ -89,7 +82,5 @@ fileName += '_' + y1;

}
if (typeof options.location === 'object') {
const loc = options.location;
const name = loc.zip || loc.asciiname || loc.getShortName();
if (name) {

@@ -99,5 +90,5 @@ fileName += '_' + makeAnchor(name).replace(/[-]/g, '_');

}
return fileName;
}
/**

@@ -107,3 +98,2 @@ * @param {number} number

*/
function pad2(number) {

@@ -113,5 +103,5 @@ if (number < 10) {

}
return '' + number;
}
/**

@@ -121,3 +111,2 @@ * @param {number} number

*/
function pad4(number) {

@@ -133,5 +122,5 @@ if (number < 0) {

}
return '' + number;
}
/**

@@ -142,8 +131,9 @@ * Returns just the date portion as YYYY-MM-DD

*/
function toISOString(d) {
return pad4(d.getFullYear()) + '-' + pad2(d.getMonth() + 1) + '-' + pad2(d.getDate());
}
const flagToCategory = [[core.flags.MAJOR_FAST, 'holiday', 'major', 'fast'], [core.flags.CHANUKAH_CANDLES, 'holiday', 'major'], [core.flags.DAF_YOMI, 'dafyomi'], [core.flags.HEBREW_DATE, 'hebdate'], [core.flags.MINOR_FAST, 'holiday', 'fast'], [core.flags.MINOR_HOLIDAY, 'holiday', 'minor'], [core.flags.MISHNA_YOMI, 'mishnayomi'], [core.flags.MODERN_HOLIDAY, 'holiday', 'modern'], [core.flags.MOLAD, 'molad'], [core.flags.OMER_COUNT, 'omer'], [core.flags.PARSHA_HASHAVUA, 'parashat'], // backwards-compat
const flagToCategory = [[core.flags.MAJOR_FAST, 'holiday', 'major', 'fast'], [core.flags.CHANUKAH_CANDLES, 'holiday', 'major'], [core.flags.DAF_YOMI, 'dafyomi'], [core.flags.HEBREW_DATE, 'hebdate'], [core.flags.MINOR_FAST, 'holiday', 'fast'], [core.flags.MINOR_HOLIDAY, 'holiday', 'minor'], [core.flags.MISHNA_YOMI, 'mishnayomi'], [core.flags.MODERN_HOLIDAY, 'holiday', 'modern'], [core.flags.MOLAD, 'molad'], [core.flags.OMER_COUNT, 'omer'], [core.flags.PARSHA_HASHAVUA, 'parashat'],
// backwards-compat
[core.flags.ROSH_CHODESH, 'roshchodesh'], [core.flags.SHABBAT_MEVARCHIM, 'mevarchim'], [core.flags.SPECIAL_SHABBAT, 'holiday', 'shabbat'], [core.flags.USER_EVENT, 'user']];
/**

@@ -154,6 +144,4 @@ * Returns a category and subcategory name

*/
function getEventCategories(ev) {
const desc = ev.getDesc();
switch (desc) {

@@ -164,7 +152,5 @@ // LIGHT_CANDLES or LIGHT_CANDLES_TZEIS

// YOM_TOV_ENDS
case 'Havdalah':
return ['havdalah'];
// flags.MINOR_FAST or flags.MAJOR_FAST
case 'Fast begins':

@@ -174,18 +160,13 @@ case 'Fast ends':

}
if (ev.cholHaMoedDay) {
return ['holiday', 'major', 'cholhamoed'];
}
const mask = ev.getFlags();
for (let i = 0; i < flagToCategory.length; i++) {
const attrs = flagToCategory[i];
if (mask & attrs[0]) {
return attrs.slice(1);
}
} // Don't depend on flags.MINOR_HOLIDAY always being set
}
// Don't depend on flags.MINOR_HOLIDAY always being set
switch (desc) {

@@ -202,3 +183,2 @@ case 'Lag BaOmer':

return ['holiday', 'minor'];
default:

@@ -208,2 +188,3 @@ return ['holiday', 'major'];

}
/**

@@ -214,6 +195,6 @@ * Renders the event title in default locale, but strips off time

*/
function renderTitleWithoutTime(ev) {
return typeof ev.eventTime === 'undefined' ? ev.render() : ev.renderBrief();
}
/**

@@ -225,7 +206,5 @@ * Generates a title like "Hebcal 2020 Israel" or "Hebcal May 1993 Providence"

*/
function getCalendarTitle(events, options) {
let title = 'Hebcal';
const location = options.location;
if (options.yahrzeit) {

@@ -242,7 +221,5 @@ title += ' Yahrzeits and Anniversaries';

}
if (options.subscribe == '1') {
return title;
}
if (options.year && (options.isHebrewYear || events.length == 0)) {

@@ -253,3 +230,2 @@ title += ' ' + options.year;

const end = events[events.length - 1].getDate().greg();
if (start.getFullYear() != end.getFullYear()) {

@@ -267,5 +243,5 @@ title += ' ' + start.getFullYear() + '-' + end.getFullYear();

}
return title;
}
/**

@@ -277,9 +253,6 @@ * Returns an English language description of the holiday

*/
function getHolidayDescription(ev, firstSentence = false) {
const str = holidayDescription[ev.getDesc()] || holidayDescription[ev.basename()] || '';
if (firstSentence && str) {
const dot = str.indexOf('.');
if (dot != -1) {

@@ -289,6 +262,6 @@ return str.substring(0, dot);

}
return str;
}
const HOLIDAY_IGNORE_MASK = core.flags.DAF_YOMI | core.flags.OMER_COUNT | core.flags.SHABBAT_MEVARCHIM | core.flags.MOLAD | core.flags.USER_EVENT | core.flags.HEBREW_DATE;
/**

@@ -300,13 +273,11 @@ * Makes mulit-line text that summarizes Torah & Haftarah

*/
function makeTorahMemoText(ev, il) {
const mask = ev.getFlags();
if (mask & HOLIDAY_IGNORE_MASK) {
return '';
} else if (typeof ev.eventTime !== 'undefined') {
return '';
}
const reading = mask & core.flags.PARSHA_HASHAVUA ? leyning.getLeyningForParshaHaShavua(ev, il) : leyning.getLeyningForHoliday(ev, il);
let memo = '';
if (reading && (reading.summary || reading.haftara)) {

@@ -316,10 +287,7 @@ if (reading.summary) {

}
if (reading.summary && reading.haftara) {
memo += '\n';
}
if (reading.haftara) {
memo += 'Haftarah: ' + reading.haftara;
if (reading.reason && reading.reason.haftara) {

@@ -330,9 +298,8 @@ memo += ' | ' + reading.reason.haftara;

}
if (reading && reading.sephardic) {
memo += '\nHaftarah for Sephardim: ' + reading.sephardic;
}
return memo;
}
/**

@@ -347,7 +314,5 @@ * Appends utm_source and utm_medium parameters to a URL

*/
function appendIsraelAndTracking(url, il, utmSource, utmMedium, utmCampaign) {
const u = new URL(url);
const isHebcal = u.host === 'www.hebcal.com';
if (isHebcal) {

@@ -357,3 +322,2 @@ if (il) {

}
const path = u.pathname;

@@ -363,6 +327,4 @@ const isHolidays = path.startsWith('/holidays/');

const isOmer = path.startsWith('/omer/');
if (isHolidays || isSedrot || isOmer) {
u.host = 'hebcal.com';
if (isHolidays) {

@@ -376,3 +338,2 @@ u.pathname = '/h/' + path.substring(10);

}
if (!utmCampaign || !(utmCampaign.startsWith('ical-') || utmCampaign.startsWith('pdf-'))) {

@@ -382,3 +343,2 @@ if (utmSource) {

}
if (utmMedium) {

@@ -388,27 +348,21 @@ u.searchParams.set('um', utmMedium);

}
if (utmCampaign) {
u.searchParams.set('uc', utmCampaign);
}
return u.toString();
}
}
utmSource = isHebcal ? utmSource : 'hebcal.com';
if (utmSource) {
u.searchParams.set('utm_source', utmSource);
}
if (utmMedium) {
u.searchParams.set('utm_medium', utmMedium);
}
if (utmCampaign) {
u.searchParams.set('utm_campaign', utmCampaign);
}
return u.toString();
}
/**

@@ -419,7 +373,5 @@ * @private

*/
function shouldRenderBrief(ev) {
if (typeof ev.eventTime !== 'undefined') return true;
const mask = ev.getFlags();
if (mask & core.flags.HEBREW_DATE) {

@@ -439,2 +391,3 @@ const hd = ev.getDate();

// eslint-disable-next-line max-len
const csvHeader = '"Subject","Start Date","Start Time","End Date","End Time","All day event","Description","Show time as","Location"';

@@ -452,2 +405,3 @@ const CATEGORY = {

};
/**

@@ -459,3 +413,2 @@ * Renders an Event as a string

*/
function eventToCsv(e, options) {

@@ -473,3 +426,2 @@ const d = e.getDate().greg();

let subj = shouldRenderBrief(e) ? e.renderBrief(options.locale) : e.render(options.locale);
if (e.eventTime) {

@@ -481,6 +433,4 @@ const timeStr = core.HebrewCalendar.reformatTimeStr(e.eventTimeStr, ' PM', options);

}
let loc = 'Jewish Holidays';
const mask = e.getFlags();
if (timed && options.location && options.location.name) {

@@ -492,3 +442,2 @@ const locationName = options.location.name;

const colon = subj.indexOf(': ');
if (colon != -1) {

@@ -500,3 +449,2 @@ loc = subj.substring(0, colon);

const category = CATEGORY[getEventCategories(e)[0]];
if (category) {

@@ -506,8 +454,5 @@ loc = category;

}
subj = subj.replace(/,/g, '').replace(/"/g, '\'\'');
if (options.appendHebrewToSubject) {
const hebrew = e.renderBrief('he');
if (hebrew) {

@@ -517,9 +462,6 @@ subj += ` / ${hebrew}`;

}
let memo0 = e.memo || getHolidayDescription(e, true);
if (!memo0 && typeof e.linkedEvent !== 'undefined') {
memo0 = e.linkedEvent.render(options.locale);
}
const memo = memo0.replace(/,/g, ';').replace(/"/g, '\'\'').replace(/\n/g, ' / ');

@@ -529,2 +471,3 @@ const showTimeAs = timed || mask & core.flags.CHAG ? 4 : 3;

}
/**

@@ -535,3 +478,2 @@ * @param {Event[]} events

*/
function eventsToCsv(events, options) {

@@ -546,6 +488,6 @@ return [csvHeader].concat(events.map(e => eventToCsv(e, options))).join('\r\n') + '\r\n';

*/
function eventIsoDate(ev) {
return toISOString(ev.getDate().greg());
}
/**

@@ -558,4 +500,2 @@ * Formats a list events for the classic Hebcal.com JSON API response

*/
function eventsToClassicApi(events, options, leyning = true) {

@@ -567,3 +507,2 @@ const result = {

result.location = locationToPlainObj(options.location);
if (events.length) {

@@ -575,6 +514,6 @@ result.range = {

}
result.items = events.map(ev => eventToClassicApiObject(ev, options, leyning));
return result;
}
/**

@@ -587,3 +526,2 @@ * Converts a Hebcal event to a classic Hebcal.com JSON API object

*/
function eventToClassicApiObject(ev, options, leyning$1 = true) {

@@ -600,3 +538,2 @@ const timed = Boolean(ev.eventTime);

const candles = desc === 'Havdalah' || desc === 'Candle lighting';
if (candles) {

@@ -606,3 +543,2 @@ const time = core.HebrewCalendar.reformatTimeStr(ev.eventTimeStr, 'pm', options);

}
const result = {

@@ -612,27 +548,19 @@ title: title,

};
if (!timed) {
result.hdate = hd.toString();
}
result.category = categories[0];
if (categories.length > 1) {
result.subcat = categories[1];
}
if (categories[0] === 'holiday' && mask & core.flags.CHAG) {
result.yomtov = true;
}
if (title != desc) {
result.title_orig = desc;
}
const hebrew = ev.renderBrief('he');
if (hebrew) {
result.hebrew = core.Locale.hebrewStripNikkud(hebrew);
}
if (!candles) {

@@ -643,10 +571,7 @@ if (leyning$1) {

const reading = isParsha ? leyning.getLeyningForParshaHaShavua(ev, il) : leyning.getLeyningForHoliday(ev, il);
if (reading) {
result.leyning = formatLeyningResult(reading);
const hyear = hd.getFullYear();
if (isParsha && !il && hyear >= 5745) {
const triReading = triennial.getTriennialForParshaHaShavua(ev);
if (triReading) {

@@ -658,5 +583,3 @@ result.leyning.triennial = formatAliyot({}, triReading.aliyot);

}
const url = ev.url();
if (url) {

@@ -669,3 +592,2 @@ const utmSource = options.utmSource || 'js';

}
if (mask & core.flags.OMER_COUNT) {

@@ -684,3 +606,2 @@ result.omer = {

}
if (options.heDateParts && !timed || mask & core.flags.HEBREW_DATE) {

@@ -696,5 +617,3 @@ const yy = hd.getFullYear();

}
const memo = ev.memo || holidayDescription[ev.basename()];
if (memo) {

@@ -705,9 +624,8 @@ result.memo = memo;

}
if (options.includeEvent) {
result.ev = ev;
}
return result;
}
/**

@@ -718,7 +636,5 @@ * @param {Object} result

*/
function formatAliyot(result, aliyot) {
Object.keys(aliyot).forEach(num => {
const aliyah = aliyot[num];
if (typeof aliyah !== 'undefined') {

@@ -731,2 +647,3 @@ const k = num == 'M' ? 'maftir' : num;

}
/**

@@ -736,23 +653,16 @@ * @param {Leyning} reading

*/
function formatLeyningResult(reading) {
const result = {};
if (reading.summary) {
result.torah = reading.summary;
}
if (reading.haftara) {
result.haftarah = reading.haftara;
}
if (reading.sephardic) {
result.haftarah_sephardic = reading.sephardic;
}
if (reading.fullkriyah) {
formatAliyot(result, reading.fullkriyah);
}
if (reading.reason) {

@@ -765,3 +675,2 @@ ['7', '8', 'M'].forEach(num => {

});
if (reading.reason.haftara) {

@@ -771,3 +680,2 @@ result.haftarah += ' | ' + reading.reason.haftara;

}
return result;

@@ -786,3 +694,2 @@ }

*/
function getLinkAndGuid(ev, il, tzid, mainUrl, utmSource, utmMedium) {

@@ -798,3 +705,2 @@ let link;

const url0 = ev.url();
if (url0) {

@@ -809,6 +715,4 @@ link = appendIsraelAndTracking(url0, il, utmSource, utmMedium).replace(/&/g, '&amp;');

}
return [link, guid];
}
const localeToLg = {

@@ -822,2 +726,3 @@ 's': 'en',

};
/**

@@ -828,3 +733,2 @@ * @param {Event[]} events

*/
function eventsToRss2(events, options) {

@@ -866,2 +770,3 @@ options.dayFormat = new Intl.DateTimeFormat('en-US', {

}
/**

@@ -875,16 +780,13 @@ * @private

*/
function getPubDate(ev, evPubDate, evDate, lastBuildDate) {
if (evPubDate) {
const dt = ev.eventTime;
if (dt) {
return dt.toUTCString();
}
return evDate.toUTCString().replace(/ \S+ GMT$/, ' 00:00:00 GMT');
}
return lastBuildDate;
}
/**

@@ -895,4 +797,2 @@ * @param {Event} ev

*/
function eventToRssItem2(ev, options) {

@@ -915,6 +815,4 @@ let subj = ev.render();

let memo;
if (candles) {
const colon = subj.indexOf(': ');
if (colon != -1) {

@@ -932,3 +830,2 @@ const options = {

}
const dayFormat = options.dayFormat;

@@ -955,11 +852,8 @@ const description = memo || dayFormat.format(evDate);

*/
function eventToFullCalendar(ev, tzid, il) {
const classes = getEventCategories(ev);
const mask = ev.getFlags();
if (classes[0] == 'holiday' && mask & core.flags.CHAG) {
classes.push('yomtov');
}
const timed = Boolean(ev.eventTime);

@@ -975,19 +869,13 @@ const title = shouldRenderBrief(ev) ? ev.renderBrief() : ev.render();

const hebrew = ev.renderBrief('he');
if (hebrew) {
result.hebrew = core.Locale.hebrewStripNikkud(hebrew);
}
const url = ev.url();
if (url) {
result.url = appendIsraelAndTracking(url, il, 'js', 'fc');
}
const desc = ev.getDesc();
const candles = desc === 'Havdalah' || desc === 'Candle lighting';
if (!candles) {
const memo = mask & core.flags.PARSHA_HASHAVUA ? makeTorahMemoText(ev, il) : ev.memo || holidayDescription[ev.basename()];
if (memo) {

@@ -999,3 +887,2 @@ result.description = memo;

}
return result;

@@ -1002,0 +889,0 @@ }

{
"name": "@hebcal/rest-api",
"version": "4.3.5",
"version": "4.3.6",
"author": "Michael J. Radwin (https://github.com/mjradwin)",

@@ -24,3 +24,3 @@ "keywords": [

"dependencies": {
"@hebcal/core": "^3.45.2",
"@hebcal/core": "^3.45.5",
"@hebcal/leyning": "^6.2.2",

@@ -48,18 +48,18 @@ "@hebcal/triennial": "^1.0.4"

"devDependencies": {
"@babel/core": "^7.19.3",
"@babel/preset-env": "^7.19.4",
"@babel/core": "^7.20.2",
"@babel/preset-env": "^7.20.2",
"@babel/register": "^7.18.9",
"@rollup/plugin-babel": "^6.0.0",
"@rollup/plugin-commonjs": "^23.0.0",
"@rollup/plugin-json": "^5.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
"ava": "^4.3.3",
"core-js": "^3.25.5",
"eslint": "^8.25.0",
"@rollup/plugin-babel": "^6.0.2",
"@rollup/plugin-commonjs": "^23.0.2",
"@rollup/plugin-json": "^5.0.1",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-terser": "^0.1.0",
"ava": "^5.0.1",
"core-js": "^3.26.1",
"eslint": "^8.27.0",
"eslint-config-google": "^0.14.0",
"jsdoc": "^3.6.11",
"jsdoc": "^4.0.0",
"jsdoc-to-markdown": "^7.1.1",
"rollup": "^2.79.1",
"rollup-plugin-terser": "^7.0.2"
"rollup": "^3.3.0"
}
}
# @hebcal/rest-api
Jewish holidays and Hebrew calendar as plain JSON objects, RSS, and CSV export
[![Build Status](https://circleci.com/gh/hebcal/hebcal-rest-api.svg?style=svg)](https://circleci.com/gh/hebcal/hebcal-rest-api)
[![Build Status](https://github.com/hebcal/hebcal-rest-api/actions/workflows/node.js.yml/badge.svg)](https://github.com/hebcal/hebcal-rest-api/actions/workflows/node.js.yml)

@@ -6,0 +6,0 @@ ## Installation

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc