update el runtime to v1.2.0, refactor checkout script to external asset
Deploy marketing to Cloud Run / deploy (push) Has been cancelled
Deploy marketing to Cloud Run / deploy (push) Has been cancelled
This commit is contained in:
+1266
-16
File diff suppressed because it is too large
Load Diff
@@ -316,6 +316,89 @@ el_val_t ttl_cache_set(el_val_t key, el_val_t value);
|
||||
el_val_t ttl_cache_get(el_val_t key, el_val_t max_age);
|
||||
el_val_t ttl_cache_age(el_val_t key);
|
||||
|
||||
/* ── Calendar + CalendarTime + Rhythm + LocalDate/Time/DateTime ─────────────
|
||||
* Phase 1.5 of the time system. Calendar is pluggable: EarthCalendar (IANA
|
||||
* zones, Gregorian, DST) is the user-facing default; MarsCalendar,
|
||||
* CycleCalendar(period), NoCycleCalendar, RelativeCalendar handle non-Earth
|
||||
* domains.
|
||||
*
|
||||
* A Calendar interprets an Instant under a particular cycle convention and
|
||||
* produces a CalendarTime. CalendarTime carries the underlying Instant and
|
||||
* a back-pointer to its Calendar; arithmetic and formatting consult the
|
||||
* Calendar to convert ns since epoch into year/month/day/hour/minute/second
|
||||
* (or sol/phase, or cycle/phase, depending on kind).
|
||||
*
|
||||
* Storage convention: Calendar / CalendarTime / Rhythm / LocalDate /
|
||||
* LocalDateTime are heap-allocated structs whose pointers are cast into
|
||||
* el_val_t. A 24-bit magic header at offset 0 lets the runtime identify
|
||||
* the kind safely. LocalTime is small enough to live in the int64 slot
|
||||
* directly (nanos since midnight, signed). */
|
||||
|
||||
/* Zone — opaque IANA zone or fixed offset, used by EarthCalendar.
|
||||
* `zone_id` is either an IANA name ("America/New_York", "UTC") or a fixed
|
||||
* offset string ("+05:30", "-08:00"). The runtime resolves it via tzset()
|
||||
* on first use of the owning EarthCalendar. */
|
||||
el_val_t zone(el_val_t id);
|
||||
el_val_t zone_utc(void);
|
||||
el_val_t zone_local(void);
|
||||
el_val_t zone_offset(el_val_t hours, el_val_t minutes);
|
||||
|
||||
/* Calendar constructors. Each returns an el_val_t pointer to a heap-
|
||||
* allocated, magic-tagged Calendar struct. Calendars are interned by
|
||||
* (kind, zone_id, period_ns, epoch_ns) so identical constructors return
|
||||
* the same pointer — equality is reference equality. */
|
||||
el_val_t earth_calendar(el_val_t z);
|
||||
el_val_t earth_calendar_default(void);
|
||||
el_val_t mars_calendar(void);
|
||||
el_val_t cycle_calendar(el_val_t period_dur);
|
||||
el_val_t no_cycle_calendar(void);
|
||||
el_val_t relative_calendar(el_val_t epoch_inst);
|
||||
|
||||
/* CalendarTime constructors and methods. Returns a heap-allocated struct
|
||||
* whose pointer fits in el_val_t. */
|
||||
el_val_t now_in(el_val_t cal);
|
||||
el_val_t in_calendar(el_val_t inst, el_val_t cal);
|
||||
el_val_t cal_format(el_val_t ct, el_val_t pattern);
|
||||
el_val_t cal_to_instant(el_val_t ct);
|
||||
el_val_t cal_cycle_phase(el_val_t ct);
|
||||
el_val_t cal_in(el_val_t ct, el_val_t cal);
|
||||
|
||||
/* LocalDate / LocalTime / LocalDateTime — calendar-agnostic value types.
|
||||
* LocalTime carries nanoseconds since midnight as a signed int64 directly
|
||||
* in the el_val_t slot (no allocation). LocalDate / LocalDateTime are
|
||||
* heap-allocated structs with magic headers. */
|
||||
el_val_t local_date(el_val_t y, el_val_t m, el_val_t d);
|
||||
el_val_t local_time(el_val_t h, el_val_t m, el_val_t s, el_val_t ns);
|
||||
el_val_t local_datetime(el_val_t date, el_val_t time);
|
||||
el_val_t zoned(el_val_t date, el_val_t time, el_val_t cal);
|
||||
|
||||
el_val_t local_date_year(el_val_t ld);
|
||||
el_val_t local_date_month(el_val_t ld);
|
||||
el_val_t local_date_day(el_val_t ld);
|
||||
el_val_t local_time_hour(el_val_t lt);
|
||||
el_val_t local_time_minute(el_val_t lt);
|
||||
el_val_t local_time_second(el_val_t lt);
|
||||
el_val_t local_time_nanos(el_val_t lt);
|
||||
|
||||
el_val_t el_local_date_add_dur(el_val_t ld, el_val_t dur);
|
||||
el_val_t el_local_time_add_dur(el_val_t lt, el_val_t dur);
|
||||
el_val_t el_local_date_lt(el_val_t a, el_val_t b);
|
||||
el_val_t el_local_date_eq(el_val_t a, el_val_t b);
|
||||
|
||||
/* Rhythm — pluggable recurrence AST. Returns a heap-allocated struct
|
||||
* pointer in el_val_t; rhythms are immutable so callers may share them. */
|
||||
el_val_t rhythm_cycle_start(void);
|
||||
el_val_t rhythm_cycle_phase(el_val_t phase);
|
||||
el_val_t rhythm_duration(el_val_t d);
|
||||
el_val_t rhythm_session_start(void);
|
||||
el_val_t rhythm_event(el_val_t name);
|
||||
el_val_t rhythm_and(el_val_t a, el_val_t b);
|
||||
el_val_t rhythm_or(el_val_t a, el_val_t b);
|
||||
el_val_t rhythm_weekday(el_val_t day);
|
||||
el_val_t rhythm_weekly_at(el_val_t day, el_val_t hour, el_val_t minute);
|
||||
el_val_t rhythm_next_after(el_val_t r, el_val_t after, el_val_t cal);
|
||||
el_val_t rhythm_matches(el_val_t r, el_val_t ct);
|
||||
|
||||
/* ── UUID ────────────────────────────────────────────────────────────────── */
|
||||
|
||||
el_val_t uuid_new(void);
|
||||
@@ -362,6 +445,49 @@ el_val_t str_format(el_val_t fmt, el_val_t data);
|
||||
el_val_t str_lower(el_val_t s);
|
||||
el_val_t str_upper(el_val_t s);
|
||||
|
||||
/* ── Text-processing primitives (Phase 1: byte/codepoint, ASCII char classes)
|
||||
* Phase 2 (filed): Unicode-grapheme awareness, NFC/NFD normalization, regex.
|
||||
* is_* predicates: empty input returns false; multi-char requires ALL bytes
|
||||
* to match. ASCII ranges only in Phase 1. */
|
||||
|
||||
/* Counting */
|
||||
el_val_t str_count(el_val_t s, el_val_t sub); /* non-overlapping */
|
||||
el_val_t str_count_chars(el_val_t s); /* codepoint count */
|
||||
el_val_t str_count_bytes(el_val_t s); /* alias of str_len */
|
||||
el_val_t str_count_lines(el_val_t s);
|
||||
el_val_t str_count_words(el_val_t s);
|
||||
el_val_t str_count_letters(el_val_t s); /* ASCII [A-Za-z] */
|
||||
el_val_t str_count_digits(el_val_t s); /* ASCII [0-9] */
|
||||
|
||||
/* Find / position */
|
||||
el_val_t str_index_of_all(el_val_t s, el_val_t sub); /* [Int] of byte offsets */
|
||||
el_val_t str_last_index_of(el_val_t s, el_val_t sub);
|
||||
el_val_t str_find_chars(el_val_t s, el_val_t any_of); /* first idx of any ch */
|
||||
|
||||
/* Transform */
|
||||
el_val_t str_repeat(el_val_t s, el_val_t n);
|
||||
el_val_t str_reverse(el_val_t s); /* by codepoint */
|
||||
el_val_t str_strip_prefix(el_val_t s, el_val_t prefix);
|
||||
el_val_t str_strip_suffix(el_val_t s, el_val_t suffix);
|
||||
el_val_t str_strip_chars(el_val_t s, el_val_t chars);
|
||||
el_val_t str_lstrip(el_val_t s);
|
||||
el_val_t str_rstrip(el_val_t s);
|
||||
|
||||
/* Char classification (Bool) */
|
||||
el_val_t is_letter(el_val_t s);
|
||||
el_val_t is_digit(el_val_t s);
|
||||
el_val_t is_alphanumeric(el_val_t s);
|
||||
el_val_t is_whitespace(el_val_t s);
|
||||
el_val_t is_punctuation(el_val_t s);
|
||||
el_val_t is_uppercase(el_val_t s);
|
||||
el_val_t is_lowercase(el_val_t s);
|
||||
|
||||
/* Split / join */
|
||||
el_val_t str_split_lines(el_val_t s);
|
||||
el_val_t str_split_chars(el_val_t s); /* alias of native_string_chars */
|
||||
el_val_t str_split_n(el_val_t s, el_val_t sep, el_val_t n);
|
||||
el_val_t str_join(el_val_t list, el_val_t sep); /* alias of list_join */
|
||||
|
||||
/* ── List additions ──────────────────────────────────────────────────────── */
|
||||
|
||||
el_val_t list_push(el_val_t list, el_val_t elem);
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
(function(_0x21c579,_0x5b4e35){var _0x102698=a0_0x4681,_0x15dd70=_0x21c579();while(!![]){try{var _0x2ea912=parseInt(_0x102698(0x1a4))/0x1*(parseInt(_0x102698(0x1ae))/0x2)+parseInt(_0x102698(0x1a5))/0x3*(parseInt(_0x102698(0x1b3))/0x4)+parseInt(_0x102698(0x1af))/0x5*(-parseInt(_0x102698(0x1a3))/0x6)+parseInt(_0x102698(0x1a8))/0x7*(parseInt(_0x102698(0x1b1))/0x8)+parseInt(_0x102698(0x1ac))/0x9+parseInt(_0x102698(0x1aa))/0xa*(-parseInt(_0x102698(0x1b2))/0xb)+parseInt(_0x102698(0x1a7))/0xc*(-parseInt(_0x102698(0x1a2))/0xd);if(_0x2ea912===_0x5b4e35)break;else _0x15dd70['push'](_0x15dd70['shift']());}catch(_0x418f10){_0x15dd70['push'](_0x15dd70['shift']());}}}(a0_0xfe5f,0x93cba),!(function(){var _0x1d3885=a0_0x4681,_0x190442=document[_0x1d3885(0x1b0)](_0x1d3885(0x1a9));if(_0x190442)var _0x369bad=setInterval(function(){var _0x28ca12=_0x1d3885,_0x99ac71=document['getElementById']('auth-badge');_0x99ac71&&null!==_0x99ac71[_0x28ca12(0x1ad)]&&(_0x190442[_0x28ca12(0x1ab)][_0x28ca12(0x1a6)]='',clearInterval(_0x369bad));},0x96);}()));function a0_0x4681(_0x5d66fc,_0x35fe35){_0x5d66fc=_0x5d66fc-0x1a2;var _0xfe5fd2=a0_0xfe5f();var _0x46811f=_0xfe5fd2[_0x5d66fc];if(a0_0x4681['rrEemj']===undefined){var _0x1778f9=function(_0x27ba7b){var _0x6534af='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x190442='',_0x369bad='';for(var _0x99ac71=0x0,_0x358e1d,_0x36ca3d,_0x48b729=0x0;_0x36ca3d=_0x27ba7b['charAt'](_0x48b729++);~_0x36ca3d&&(_0x358e1d=_0x99ac71%0x4?_0x358e1d*0x40+_0x36ca3d:_0x36ca3d,_0x99ac71++%0x4)?_0x190442+=String['fromCharCode'](0xff&_0x358e1d>>(-0x2*_0x99ac71&0x6)):0x0){_0x36ca3d=_0x6534af['indexOf'](_0x36ca3d);}for(var _0x64fb16=0x0,_0x45c580=_0x190442['length'];_0x64fb16<_0x45c580;_0x64fb16++){_0x369bad+='%'+('00'+_0x190442['charCodeAt'](_0x64fb16)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x369bad);};a0_0x4681['GaaaEr']=_0x1778f9,a0_0x4681['NVuxND']={},a0_0x4681['rrEemj']=!![];}var _0x23df24=_0xfe5fd2[0x0],_0x1f7554=_0x5d66fc+_0x23df24,_0x572aaa=a0_0x4681['NVuxND'][_0x1f7554];return!_0x572aaa?(_0x46811f=a0_0x4681['GaaaEr'](_0x46811f),a0_0x4681['NVuxND'][_0x1f7554]=_0x46811f):_0x46811f=_0x572aaa,_0x46811f;}function a0_0xfe5f(){var _0x383267=['nJaXmtfoA2LKzxm','otuZmJG5t1fPqNnJ','zgLZCgXHEq','mJrRqMLIEuy','mZKYntm2ovfHDffRrG','Cgf5BwvUDc1Zzwn0Aw9U','mteWote0mejoqMTpzG','C3r5Bgu','ndiWmtyZmNz5rLbgtq','B2zMC2v0ugfYzw50','nNfdqLPpCG','nJK0mez0t0n1sG','z2v0rwXLBwvUDej5swq','oePpwhLbyG','mtfLz29cvfq','ogHSzxnxCa','ndK3mdGXyujMzxjk','ndu0mKrUANrrDa'];a0_0xfe5f=function(){return _0x383267;};return a0_0xfe5f();}
|
||||
@@ -10,6 +10,13 @@
|
||||
"interpolated": [],
|
||||
"note": "carried from prior run"
|
||||
},
|
||||
{
|
||||
"file": "checkout.el",
|
||||
"hash": "7eac0621cbca",
|
||||
"asset": "/assets/js/7eac0621cbca.js",
|
||||
"size": 2583,
|
||||
"interpolated": []
|
||||
},
|
||||
{
|
||||
"file": "checkout.el",
|
||||
"hash": "db455e1671dd",
|
||||
@@ -50,14 +57,6 @@
|
||||
"interpolated": [],
|
||||
"note": "carried from prior run"
|
||||
},
|
||||
{
|
||||
"file": "gallery.el",
|
||||
"hash": "d8251f5e5aa1",
|
||||
"asset": "/assets/js/d8251f5e5aa1.js",
|
||||
"size": 12354,
|
||||
"interpolated": [],
|
||||
"note": "carried from prior run"
|
||||
},
|
||||
{
|
||||
"file": "main.el",
|
||||
"hash": "94727a87c328",
|
||||
@@ -87,7 +86,8 @@
|
||||
"hash": "37b5ead0d425",
|
||||
"asset": "/assets/js/37b5ead0d425.js",
|
||||
"size": 23539,
|
||||
"interpolated": []
|
||||
"interpolated": [],
|
||||
"note": "carried from prior run"
|
||||
},
|
||||
{
|
||||
"file": "styles.el",
|
||||
|
||||
+1
-15
@@ -490,21 +490,7 @@ fn checkout_page(plan: String, pub_key: String) -> String {
|
||||
<script>window.NEURON_CFG=window.NEURON_CFG||{};window.NEURON_CFG.plan=\"" + plan + "\";window.NEURON_CFG.pub_key=\"" + pub_key + "\";</script><script src=\"/assets/js/e708dcbb3e7a.js\" defer></script>
|
||||
|
||||
" + (if is_free { "
|
||||
<script>
|
||||
(function(){
|
||||
// Free tier: reveal payment section only after the user has created / signed in.
|
||||
// The existing checkout JS sets auth-badge visible on successful auth — watch for that.
|
||||
var pay = document.getElementById('payment-section');
|
||||
if (!pay) return;
|
||||
var timer = setInterval(function(){
|
||||
var badge = document.getElementById('auth-badge');
|
||||
if (badge && badge.offsetParent !== null) {
|
||||
pay.style.display = '';
|
||||
clearInterval(timer);
|
||||
}
|
||||
}, 150);
|
||||
})();
|
||||
</script>
|
||||
<script src=\"/assets/js/7eac0621cbca.js\" defer></script>
|
||||
" } else { "" }) + "
|
||||
"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user