Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/Pricing/TbPerpetualCalculator.astro
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ import CalculatorModal from './CalculatorModal.astro';
</div>
<div class="calc-input-row">
<div style="flex:1;">
<label class="calc-label">AI Credits <span class="calc-tooltip"><Icon name="tabler:info-circle" /><span class="calc-tooltip-text"><span class="calc-tooltip-arrow"></span><span class="calc-tooltip-body">AI credits power AI features across the platform. 1 = 1,000,000 credits; 5M credits are included with the license. Extra credits are priced individually.</span></span></span></label>
<p class="calc-addon-desc">1 = 1,000,000 credits. 5M included. Extra credits are priced individually.</p>
<label class="calc-label">AI Credits <span class="calc-tooltip"><Icon name="tabler:info-circle" /><span class="calc-tooltip-text"><span class="calc-tooltip-arrow"></span><span class="calc-tooltip-body">AI credits power AI features across the platform. 1 = 1,000,000 credits; 5M credits are included with the license. A one-time fee applies to additional credits.</span></span></span></label>
<p class="calc-addon-desc">1 = 1,000,000 credits. 5M included.</p>
</div>
<div class="calc-stepper" id="perp-ai-stepper">
<button type="button" class="calc-stepper-btn" data-action="decrement" disabled aria-label="Decrease AI credits">&minus;</button>
Expand Down
23 changes: 12 additions & 11 deletions src/scripts/pricing/calc-tb-perp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ const PERP = {
price: 4999, includedDevices: 5000, extraDevicePrice: 1,
includedProdInstances: 1, extraProdInstancePrice: 4999, devicesPerInstance: 5000,
devQaExtraInstancePrice: 999,
// 1 AI credit pack = 1,000,000 credits; 5 packs come with the license.
// Extra packs have no public list price (priced per-plan on the License
// Portal), so requesting them routes to the custom-pricing wall.
includedAiCreditPacks: 5,
// 1 AI credit pack = 1,000,000 credits; 5 packs come with the license,
// extra packs are a one-time fee each (matches the License Portal).
includedAiCreditPacks: 5, extraAiCreditPackPrice: 5,
edgeBasePrice: 849, edgeInstancesIncluded: 2, extraEdgePrice: 399,
trendzBasePrice: 1499, trendzExtraDevicePrice: 0.3,
offlineModePrice: 19999,
Expand Down Expand Up @@ -150,7 +149,7 @@ export function initTbPerpCalc() {
function row(l: string, v: string, t?: string) { return `<div class="calc-result-row"><span class="calc-row-label">${l}:</span><span class="calc-row-value">${v}${t ? tip(t) : ''}</span></div>`; }

type Costs = {
extraDevCost: number; instCost: number; devCost: number;
extraDevCost: number; instCost: number; devCost: number; aiCost: number;
edgeCost: number; trendzCost: number; offlineCost: number;
licenseTotal: number; total: number; isCustom: boolean;
extraDevTotal: number;
Expand All @@ -160,18 +159,17 @@ export function initTbPerpCalc() {
const extraDevCost = st.extraDevices * PERP.extraDevicePrice;
const instCost = st.instances * PERP.extraProdInstancePrice;
const devCost = st.dev * PERP.devQaExtraInstancePrice;
const aiCost = extraAiPacks() * PERP.extraAiCreditPackPrice;
// Add-ons scale with every device beyond the base 5,000 — purchased
// extras and instance-granted devices alike.
const extraDevTotal = deviceQuota() - PERP.includedDevices;
const edgeCost = st.addons.edge.on ? PERP.edgeBasePrice + Math.max(0, st.addons.edge.count - PERP.edgeInstancesIncluded) * PERP.extraEdgePrice : 0;
const trendzCost = st.addons.trendz.on ? PERP.trendzBasePrice + extraDevTotal * PERP.trendzExtraDevicePrice : 0;
const offlineCost = st.addons.offline.on ? PERP.offlineModePrice : 0;
const licenseTotal = PERP.price + extraDevCost + instCost + devCost;
const licenseTotal = PERP.price + extraDevCost + instCost + devCost + aiCost;
const total = licenseTotal + edgeCost + trendzCost + offlineCost;
// Extra AI credit packs have no public list price — any amount beyond
// the included 5 packs routes to the custom-pricing wall.
const isCustom = total >= PERP.customPricingFrom || extraAiPacks() > 0;
return { extraDevCost, instCost, devCost, edgeCost, trendzCost, offlineCost, licenseTotal, total, isCustom, extraDevTotal };
const isCustom = total >= PERP.customPricingFrom;
return { extraDevCost, instCost, devCost, aiCost, edgeCost, trendzCost, offlineCost, licenseTotal, total, isCustom, extraDevTotal };
}

// "Get a personal price" (without "for these numbers") when Offline Mode is
Expand Down Expand Up @@ -215,10 +213,12 @@ export function initTbPerpCalc() {
if (comp > 0) html += row('Complimentary Prod Instances', fN(comp), '1 Production Instance provided at no charge for every 5,000 extra devices.');
if (st.instances > 0) html += row('Purchased Prod Instances', fN(st.instances), 'Additional production instances; each includes 5,000 devices.');
html += row('Included AI Credits', `${PERP.includedAiCreditPacks}M`, '5,000,000 AI credits included for AI-powered platform features.');
if (extraAiPacks() > 0) html += row('Extra AI Credits', `${extraAiPacks()}M`, 'Additional AI credits beyond those included with the license.');
html += row('White Labeling', '<span class="calc-result-badge">Enabled</span>', 'Customization of the platform interface with your corporate branding.');
html += row('Base Price', fmt(PERP.price), 'One-time license fee before extras and add-ons.');
if (st.extraDevices > 0) html += row('Extra Devices Cost', fmt(c.extraDevCost), `${fN(st.extraDevices)} × ${fmt(PERP.extraDevicePrice)}`);
if (st.instances > 0) html += row('Prod Instances Cost', fmt(c.instCost), `${fN(st.instances)} × ${fmt(PERP.extraProdInstancePrice)}, each incl. 5,000 devices`);
if (extraAiPacks() > 0) html += row('Extra AI Credits Cost', fmt(c.aiCost), `${extraAiPacks()} × ${fmt(PERP.extraAiCreditPackPrice)}`);
if (st.dev > 0) {
html += row('Extra Dev Instances', fN(st.dev));
html += row('Extra Dev Instances Cost', fmt(c.devCost), `${fN(st.dev)} × ${fmt(PERP.devQaExtraInstancePrice)}`);
Expand Down Expand Up @@ -271,6 +271,7 @@ export function initTbPerpCalc() {
if (c.extraDevCost > 0) totalParts.push(`${fmt(c.extraDevCost)} (extra devices)`);
if (c.instCost > 0) totalParts.push(`${fmt(c.instCost)} (prod instances)`);
if (c.devCost > 0) totalParts.push(`${fmt(c.devCost)} (dev)`);
if (c.aiCost > 0) totalParts.push(`${fmt(c.aiCost)} (AI credits)`);
if (c.edgeCost > 0) totalParts.push(`${fmt(c.edgeCost)} (Edge)`);
if (c.trendzCost > 0) totalParts.push(`${fmt(c.trendzCost)} (Trendz)`);
if (c.offlineCost > 0) totalParts.push(`${fmt(c.offlineCost)} (Offline)`);
Expand Down Expand Up @@ -306,7 +307,7 @@ export function initTbPerpCalc() {
if (comp > 0) msg += `- Complimentary Prod Instances: ${fN(comp)}\n`;
if (st.instances > 0) msg += `- Purchased Prod Instances: ${fN(st.instances)}${money(` (${fmt(c.instCost)})`)}\n`;
msg += `- Included AI Credits: ${PERP.includedAiCreditPacks}M\n`;
if (extraAiPacks() > 0) msg += `- Extra AI Credits: ${extraAiPacks()}M\n`;
if (extraAiPacks() > 0) msg += `- Extra AI Credits: ${extraAiPacks()}M${money(` (${fmt(c.aiCost)})`)}\n`;
msg += `- White Labeling: Enabled\n`;
msg += money(`- Base Price: ${fmt(PERP.price)}\n`);
if (st.dev > 0) msg += `- Extra Dev Instances: ${fN(st.dev)}${money(` (${fmt(c.devCost)})`)}\n`;
Expand Down