{
  "page_ir": {
    "page_id": "calculator",
    "page_goal": "Single-page calculator application with arithmetic operations, memory functions, calculation history, keyboard support, and clipboard integration",
    "style": {
      "tone": "clean",
      "theme": "light",
      "density": "comfortable",
      "color_intent": "professional with distinct operator buttons in primary blue"
    },
    "accessibility": {
      "required_labels": [
        "Calculator display",
        "Number buttons 0-9",
        "Operator buttons",
        "Memory buttons",
        "Clear buttons",
        "History panel",
        "Copy result button",
        "Decimal point button",
        "Equals button",
        "Backspace button",
        "Percentage button",
        "Toggle sign button"
      ],
      "skip_navigation": true,
      "focus_management": true,
      "announce_changes": []
    },
    "responsive": {
      "breakpoints": {
        "sm": 480,
        "md": 768,
        "lg": 1024
      },
      "collapse_rules": [
        "Stack calculator and history vertically on small screens",
        "History drawer overlays on mobile"
      ],
      "hidden_on_small": [],
      "stack_on_small": []
    },
    "constraints": [
      "Minimum touch target 44x44px",
      "8px grid system",
      "300ms transitions for button presses and panel animations",
      "Max 15 digit display with scientific notation overflow",
      "Division by zero shows error requiring AC to clear",
      "Full keyboard input support"
    ],
    "seo_title": null,
    "seo_description": null
  },
  "data_ir": {
    "types": {},
    "state": {
      "sessionHistoryId": {
        "type": "string",
        "initial": null,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "calculatorStateId": {
        "type": "string",
        "initial": null,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "historyDrawerVisible": {
        "type": "boolean",
        "initial": false,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "loading": {
        "type": "boolean",
        "initial": false,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "errorState": {
        "type": "boolean",
        "initial": false,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "copyTooltipVisible": {
        "type": "boolean",
        "initial": false,
        "required": false,
        "constraints": {},
        "item_type": null
      }
    },
    "derived": {
      "hasMemoryValue": {
        "type": "boolean",
        "expr": "appContext.calculatorState.memory !== 0",
        "deps": []
      },
      "displayExpression": {
        "type": "string",
        "expr": "appContext.calculatorState.previousValue !== null && appContext.calculatorState.currentOperator !== null ? String(appContext.calculatorState.previousValue) + ' ' + appContext.calculatorState.currentOperator + ' ' : ''",
        "deps": []
      },
      "formattedHistory": {
        "type": "array",
        "expr": "appContext.sessionHistory.slice().reverse().slice(0, 50)",
        "deps": []
      }
    }
  },
  "data_fetch_ir": {
    "endpoints": {
      "7b5b50e1f99d49c78e69668d4af434b8": {
        "endpoint_id": "7b5b50e1f99d49c78e69668d4af434b8",
        "module": "Calculator",
        "endpoint": "/calculator/session-histories",
        "method": "POST",
        "path_params": {},
        "query_params": {},
        "body": {
          "session_id": "$derived.generatedSessionId",
          "start_time": "$derived.currentTimestamp",
          "last_activity_time": "$derived.currentTimestamp"
        },
        "fields": [
          "id",
          "session_id",
          "start_time",
          "last_activity_time"
        ],
        "response_target": "sessionHistoryId",
        "response_transform": null,
        "trigger": "on_mount",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "d0fdf0524d354b72a626a60383e9d96c": {
        "endpoint_id": "d0fdf0524d354b72a626a60383e9d96c",
        "module": "Calculator",
        "endpoint": "/calculator/calculator-states",
        "method": "POST",
        "path_params": {},
        "query_params": {},
        "body": {
          "session_history_id": "$state.sessionHistoryId",
          "current_display": "0",
          "previous_value": null,
          "current_operator": null,
          "awaiting_operand": false,
          "is_result_displayed": false,
          "memory": 0
        },
        "fields": [
          "id",
          "session_history_id",
          "current_display",
          "previous_value",
          "current_operator",
          "awaiting_operand",
          "is_result_displayed",
          "memory"
        ],
        "response_target": "calculatorStateId",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "a2cc86cd16044117af9e62c2f61e2317": {
        "endpoint_id": "a2cc86cd16044117af9e62c2f61e2317",
        "module": "Calculator",
        "endpoint": "/calculator/session-histories/{sessionhistory_id}/calculate",
        "method": "POST",
        "path_params": {
          "sessionhistory_id": "$state.sessionHistoryId"
        },
        "query_params": {},
        "body": {
          "operand1": "$appContext.calculatorState.previousValue",
          "operator": "$appContext.calculatorState.currentOperator",
          "operand2": "$derived.currentDisplayNumber"
        },
        "fields": [
          "id",
          "session_history_id",
          "operand1",
          "operator",
          "operand2",
          "result",
          "expression",
          "timestamp"
        ],
        "response_target": "calculationResult",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "c3118d4244cf4178bb7d1fd239c1dd80": {
        "endpoint_id": "c3118d4244cf4178bb7d1fd239c1dd80",
        "module": "Calculator",
        "endpoint": "/calculator/session-histories/{session_id}/calculations",
        "method": "GET",
        "path_params": {
          "session_id": "$state.sessionHistoryId"
        },
        "query_params": {
          "limit": 50
        },
        "body": null,
        "fields": [
          "id",
          "session_history_id",
          "operand1",
          "operator",
          "operand2",
          "result",
          "expression",
          "timestamp"
        ],
        "response_target": "sessionHistory",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "ecb3fc90502845d080ab378e9e71c053": {
        "endpoint_id": "ecb3fc90502845d080ab378e9e71c053",
        "module": "Calculator",
        "endpoint": "/calculator/calculator-states/{calculatorstate_id}/clear-entry",
        "method": "POST",
        "path_params": {
          "calculatorstate_id": "$state.calculatorStateId"
        },
        "query_params": {},
        "body": null,
        "fields": [
          "current_display",
          "previous_value",
          "current_operator",
          "awaiting_operand",
          "is_result_displayed",
          "memory"
        ],
        "response_target": "calculatorState",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "e014238a8da6404cb25242f0781c404e": {
        "endpoint_id": "e014238a8da6404cb25242f0781c404e",
        "module": "Calculator",
        "endpoint": "/calculator/calculator-states/{calculatorstate_id}/all-clear",
        "method": "POST",
        "path_params": {
          "calculatorstate_id": "$state.calculatorStateId"
        },
        "query_params": {},
        "body": null,
        "fields": [
          "current_display",
          "previous_value",
          "current_operator",
          "awaiting_operand",
          "is_result_displayed",
          "memory"
        ],
        "response_target": "calculatorState",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "6447b332685346e58136ae4cd149b10e": {
        "endpoint_id": "6447b332685346e58136ae4cd149b10e",
        "module": "Calculator",
        "endpoint": "/calculator/calculator-states/{calculatorstate_id}/memory-clear",
        "method": "POST",
        "path_params": {
          "calculatorstate_id": "$state.calculatorStateId"
        },
        "query_params": {},
        "body": null,
        "fields": [
          "current_display",
          "previous_value",
          "current_operator",
          "awaiting_operand",
          "is_result_displayed",
          "memory"
        ],
        "response_target": "calculatorState",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "3535ce466df844b6b07d9ca8667458fd": {
        "endpoint_id": "3535ce466df844b6b07d9ca8667458fd",
        "module": "Calculator",
        "endpoint": "/calculator/calculator-states/{calculatorstate_id}/memory-recall",
        "method": "POST",
        "path_params": {
          "calculatorstate_id": "$state.calculatorStateId"
        },
        "query_params": {},
        "body": null,
        "fields": [
          "current_display",
          "previous_value",
          "current_operator",
          "awaiting_operand",
          "is_result_displayed",
          "memory"
        ],
        "response_target": "calculatorState",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "679fcb5638ae487095a84ee19df7461b": {
        "endpoint_id": "679fcb5638ae487095a84ee19df7461b",
        "module": "Calculator",
        "endpoint": "/calculator/calculator-states/{calculatorstate_id}/memory-add",
        "method": "POST",
        "path_params": {
          "calculatorstate_id": "$state.calculatorStateId"
        },
        "query_params": {},
        "body": null,
        "fields": [
          "current_display",
          "previous_value",
          "current_operator",
          "awaiting_operand",
          "is_result_displayed",
          "memory"
        ],
        "response_target": "calculatorState",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "c11372a46f38451288f6a2f84b924ff8": {
        "endpoint_id": "c11372a46f38451288f6a2f84b924ff8",
        "module": "Calculator",
        "endpoint": "/calculator/calculator-states/{calculatorstate_id}/memory-subtract",
        "method": "POST",
        "path_params": {
          "calculatorstate_id": "$state.calculatorStateId"
        },
        "query_params": {},
        "body": null,
        "fields": [
          "current_display",
          "previous_value",
          "current_operator",
          "awaiting_operand",
          "is_result_displayed",
          "memory"
        ],
        "response_target": "calculatorState",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "5e4c8f5f35d34ca48a20da0c5f286af3": {
        "endpoint_id": "5e4c8f5f35d34ca48a20da0c5f286af3",
        "module": "Calculator",
        "endpoint": "/calculator/session-histories/{sessionhistory_id}/clear-history",
        "method": "DELETE",
        "path_params": {
          "sessionhistory_id": "$state.sessionHistoryId"
        },
        "query_params": {},
        "body": null,
        "fields": [
          "id",
          "session_id"
        ],
        "response_target": "sessionHistory",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "35a83ab42ac5434d9afd1376a3ecca2b": {
        "endpoint_id": "35a83ab42ac5434d9afd1376a3ecca2b",
        "module": "Calculator",
        "endpoint": "/calculator/calculator-states/{calculatorstate_id}",
        "method": "PATCH",
        "path_params": {
          "calculatorstate_id": "$state.calculatorStateId"
        },
        "query_params": {},
        "body": {
          "current_display": "$appContext.calculatorState.currentDisplay",
          "previous_value": "$appContext.calculatorState.previousValue",
          "current_operator": "$appContext.calculatorState.currentOperator",
          "awaiting_operand": "$appContext.calculatorState.awaitingOperand",
          "is_result_displayed": "$appContext.calculatorState.isResultDisplayed",
          "memory": "$appContext.calculatorState.memory"
        },
        "fields": [
          "current_display",
          "previous_value",
          "current_operator",
          "awaiting_operand",
          "is_result_displayed",
          "memory"
        ],
        "response_target": "calculatorState",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      }
    }
  },
  "data_model_ir": {
    "entities": {
      "sessionHistory": {
        "name": "SessionHistory",
        "backend_module": "Calculator",
        "fields": [
          "id",
          "session_id",
          "start_time",
          "last_activity_time",
          "created_at",
          "updated_at"
        ],
        "computed": [],
        "display_fields": [
          "session_id",
          "start_time",
          "last_activity_time"
        ],
        "search_fields": [],
        "filters": [],
        "default_sort": null,
        "default_sort_dir": "asc"
      },
      "calculation": {
        "name": "Calculation",
        "backend_module": "Calculator",
        "fields": [
          "id",
          "session_history_id",
          "operand1",
          "operator",
          "operand2",
          "result",
          "expression",
          "timestamp",
          "created_at",
          "updated_at"
        ],
        "computed": [],
        "display_fields": [
          "expression",
          "result",
          "timestamp"
        ],
        "search_fields": [],
        "filters": [
          "session_history_id"
        ],
        "default_sort": null,
        "default_sort_dir": "asc"
      },
      "calculatorState": {
        "name": "CalculatorState",
        "backend_module": "Calculator",
        "fields": [
          "id",
          "session_history_id",
          "current_display",
          "previous_value",
          "current_operator",
          "awaiting_operand",
          "is_result_displayed",
          "memory",
          "created_at",
          "updated_at"
        ],
        "computed": [],
        "display_fields": [
          "current_display",
          "previous_value",
          "current_operator",
          "memory"
        ],
        "search_fields": [],
        "filters": [
          "session_history_id"
        ],
        "default_sort": null,
        "default_sort_dir": "asc"
      }
    },
    "relationships": []
  },
  "behaviour_ir": {
    "events": {
      "onDigitPress": {
        "type": "mutation",
        "updates": [
          {
            "target": "appContext.calculatorState.currentDisplay",
            "expr": "appContext.calculatorState.awaitingOperand || appContext.calculatorState.isResultDisplayed ? String(digit) : (appContext.calculatorState.currentDisplay === '0' ? String(digit) : appContext.calculatorState.currentDisplay + String(digit))"
          },
          {
            "target": "appContext.calculatorState.awaitingOperand",
            "expr": "false"
          },
          {
            "target": "appContext.calculatorState.isResultDisplayed",
            "expr": "false"
          }
        ],
        "description": ""
      },
      "onOperatorPress": {
        "type": "mutation",
        "updates": [
          {
            "target": "appContext.calculatorState.previousValue",
            "expr": "parseFloat(appContext.calculatorState.currentDisplay)"
          },
          {
            "target": "appContext.calculatorState.currentOperator",
            "expr": "operator"
          },
          {
            "target": "appContext.calculatorState.awaitingOperand",
            "expr": "true"
          },
          {
            "target": "appContext.calculatorState.isResultDisplayed",
            "expr": "false"
          }
        ],
        "description": ""
      },
      "onDecimalPress": {
        "type": "mutation",
        "updates": [
          {
            "target": "appContext.calculatorState.currentDisplay",
            "expr": "appContext.calculatorState.currentDisplay.includes('.') ? appContext.calculatorState.currentDisplay : appContext.calculatorState.currentDisplay + '.'"
          }
        ],
        "description": ""
      },
      "onToggleSign": {
        "type": "mutation",
        "updates": [
          {
            "target": "appContext.calculatorState.currentDisplay",
            "expr": "appContext.calculatorState.currentDisplay.startsWith('-') ? appContext.calculatorState.currentDisplay.slice(1) : '-' + appContext.calculatorState.currentDisplay"
          }
        ],
        "description": ""
      },
      "onBackspace": {
        "type": "mutation",
        "updates": [
          {
            "target": "appContext.calculatorState.currentDisplay",
            "expr": "appContext.calculatorState.currentDisplay.length <= 1 ? '0' : appContext.calculatorState.currentDisplay.slice(0, -1)"
          }
        ],
        "description": ""
      },
      "onPercentage": {
        "type": "mutation",
        "updates": [
          {
            "target": "appContext.calculatorState.currentDisplay",
            "expr": "String(parseFloat(appContext.calculatorState.currentDisplay) / 100)"
          }
        ],
        "description": ""
      },
      "onHistoryEntryClick": {
        "type": "mutation",
        "updates": [
          {
            "target": "appContext.calculatorState.currentDisplay",
            "expr": "String(selectedResult)"
          },
          {
            "target": "appContext.calculatorState.isResultDisplayed",
            "expr": "true"
          }
        ],
        "description": ""
      },
      "toggleHistoryDrawer": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.historyDrawerVisible",
            "expr": "!state.historyDrawerVisible"
          }
        ],
        "description": ""
      },
      "onKeyboardInput": {
        "type": "mutation",
        "updates": [
          {
            "target": "appContext.calculatorState",
            "expr": "handleKeyboardEvent(event)"
          }
        ],
        "description": ""
      }
    },
    "actions": {
      "47d75baffe9b40d1b9b3edda1c4635d0": {
        "action_id": "47d75baffe9b40d1b9b3edda1c4635d0",
        "trigger": "button_click",
        "target_component_id": "btn_equals",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "appContext.calculatorState.currentDisplay",
            "expr": "calculationResult.result"
          },
          {
            "target": "appContext.calculatorState.isResultDisplayed",
            "expr": "true"
          },
          {
            "target": "appContext.calculatorState.previousValue",
            "expr": "null"
          },
          {
            "target": "appContext.calculatorState.currentOperator",
            "expr": "null"
          },
          {
            "target": "appContext.calculatorState.awaitingOperand",
            "expr": "false"
          }
        ],
        "api_endpoint": "a2cc86cd16044117af9e62c2f61e2317",
        "api_body": null,
        "side_effects": [],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "c36fc4a73753427dbd217547c464eccd": {
        "action_id": "c36fc4a73753427dbd217547c464eccd",
        "trigger": "button_click",
        "target_component_id": "btn_ce",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "appContext.calculatorState.currentDisplay",
            "expr": "'0'"
          }
        ],
        "api_endpoint": "ecb3fc90502845d080ab378e9e71c053",
        "api_body": null,
        "side_effects": [],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "57d119ac7d33441ea6058eb5fdcf34e3": {
        "action_id": "57d119ac7d33441ea6058eb5fdcf34e3",
        "trigger": "button_click",
        "target_component_id": "btn_ac",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "appContext.calculatorState.currentDisplay",
            "expr": "'0'"
          },
          {
            "target": "appContext.calculatorState.previousValue",
            "expr": "null"
          },
          {
            "target": "appContext.calculatorState.currentOperator",
            "expr": "null"
          },
          {
            "target": "appContext.calculatorState.awaitingOperand",
            "expr": "false"
          },
          {
            "target": "appContext.calculatorState.isResultDisplayed",
            "expr": "false"
          },
          {
            "target": "state.errorState",
            "expr": "false"
          }
        ],
        "api_endpoint": "e014238a8da6404cb25242f0781c404e",
        "api_body": null,
        "side_effects": [],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "48d4f90c0c964c69b7c7e41c7831f821": {
        "action_id": "48d4f90c0c964c69b7c7e41c7831f821",
        "trigger": "button_click",
        "target_component_id": "btn_mc",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "appContext.calculatorState.memory",
            "expr": "0"
          }
        ],
        "api_endpoint": "6447b332685346e58136ae4cd149b10e",
        "api_body": null,
        "side_effects": [],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "d4df056c7c1349f1a54f97c36c3cfcd6": {
        "action_id": "d4df056c7c1349f1a54f97c36c3cfcd6",
        "trigger": "button_click",
        "target_component_id": "btn_mr",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "appContext.calculatorState.currentDisplay",
            "expr": "String(appContext.calculatorState.memory)"
          }
        ],
        "api_endpoint": "3535ce466df844b6b07d9ca8667458fd",
        "api_body": null,
        "side_effects": [],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "8f6bffbc3c68494bab12ecae0044760d": {
        "action_id": "8f6bffbc3c68494bab12ecae0044760d",
        "trigger": "button_click",
        "target_component_id": "btn_mplus",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "appContext.calculatorState.memory",
            "expr": "appContext.calculatorState.memory + parseFloat(appContext.calculatorState.currentDisplay)"
          }
        ],
        "api_endpoint": "679fcb5638ae487095a84ee19df7461b",
        "api_body": null,
        "side_effects": [],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "29af1f75db0f432d919fbb1758ad644f": {
        "action_id": "29af1f75db0f432d919fbb1758ad644f",
        "trigger": "button_click",
        "target_component_id": "btn_mminus",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "appContext.calculatorState.memory",
            "expr": "appContext.calculatorState.memory - parseFloat(appContext.calculatorState.currentDisplay)"
          }
        ],
        "api_endpoint": "c11372a46f38451288f6a2f84b924ff8",
        "api_body": null,
        "side_effects": [],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "6c174ab864254471819246febbe4676d": {
        "action_id": "6c174ab864254471819246febbe4676d",
        "trigger": "button_click",
        "target_component_id": "btn_copy",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.copyTooltipVisible",
            "expr": "true"
          }
        ],
        "api_endpoint": null,
        "api_body": null,
        "side_effects": [
          {
            "type": "clipboard",
            "config": {
              "value": "$appContext.calculatorState.currentDisplay"
            }
          },
          {
            "type": "toast",
            "config": {
              "message": "Copied!",
              "type": "success"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "24f861fb08c94851b5936a85488c38b0": {
        "action_id": "24f861fb08c94851b5936a85488c38b0",
        "trigger": "button_click",
        "target_component_id": "btn_history_toggle",
        "operation": "read",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.historyDrawerVisible",
            "expr": "true"
          }
        ],
        "api_endpoint": "c3118d4244cf4178bb7d1fd239c1dd80",
        "api_body": null,
        "side_effects": [
          {
            "type": "drawer_open",
            "config": {
              "drawer_id": "history_drawer"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "70a95565e38d48959b5703a093efd527": {
        "action_id": "70a95565e38d48959b5703a093efd527",
        "trigger": "button_click",
        "target_component_id": "history_drawer",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.historyDrawerVisible",
            "expr": "false"
          }
        ],
        "api_endpoint": null,
        "api_body": null,
        "side_effects": [
          {
            "type": "drawer_close",
            "config": {
              "drawer_id": "history_drawer"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "26d94ac02cb4416b96ae9dd9a170efd1": {
        "action_id": "26d94ac02cb4416b96ae9dd9a170efd1",
        "trigger": "button_click",
        "target_component_id": "btn_clear_history",
        "operation": "delete",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": true,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "appContext.sessionHistory",
            "expr": "[]"
          }
        ],
        "api_endpoint": "5e4c8f5f35d34ca48a20da0c5f286af3",
        "api_body": null,
        "side_effects": [
          {
            "type": "toast",
            "config": {
              "message": "History cleared",
              "type": "success"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "357821927f0c4e4cb4d488a952192834": {
        "action_id": "357821927f0c4e4cb4d488a952192834",
        "trigger": "row_click",
        "target_component_id": "history_list",
        "operation": "custom",
        "description": "",
        "payload": {
          "result": "$clicked.result"
        },
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "appContext.calculatorState.currentDisplay",
            "expr": "String(payload.result)"
          },
          {
            "target": "appContext.calculatorState.isResultDisplayed",
            "expr": "true"
          }
        ],
        "api_endpoint": null,
        "api_body": null,
        "side_effects": [
          {
            "type": "drawer_close",
            "config": {
              "drawer_id": "history_drawer"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "191d5803f8da4dd1a41589a98d638d9b": {
        "action_id": "191d5803f8da4dd1a41589a98d638d9b",
        "trigger": "button_click",
        "target_component_id": "main_container",
        "operation": "create",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.sessionHistoryId",
            "expr": "response.id"
          }
        ],
        "api_endpoint": "7b5b50e1f99d49c78e69668d4af434b8",
        "api_body": null,
        "side_effects": [],
        "then": null,
        "catch": null,
        "data_action": null
      }
    },
    "feedback": {
      "47d75baffe9b40d1b9b3edda1c4635d0": {
        "action_id": "47d75baffe9b40d1b9b3edda1c4635d0",
        "loading_indicator": "none",
        "loading_text": null,
        "success_message": null,
        "error_message": "Calculation error",
        "ui_updates": []
      },
      "c36fc4a73753427dbd217547c464eccd": {
        "action_id": "c36fc4a73753427dbd217547c464eccd",
        "loading_indicator": "none",
        "loading_text": null,
        "success_message": null,
        "error_message": null,
        "ui_updates": []
      },
      "57d119ac7d33441ea6058eb5fdcf34e3": {
        "action_id": "57d119ac7d33441ea6058eb5fdcf34e3",
        "loading_indicator": "none",
        "loading_text": null,
        "success_message": null,
        "error_message": null,
        "ui_updates": []
      },
      "48d4f90c0c964c69b7c7e41c7831f821": {
        "action_id": "48d4f90c0c964c69b7c7e41c7831f821",
        "loading_indicator": "none",
        "loading_text": null,
        "success_message": null,
        "error_message": null,
        "ui_updates": []
      },
      "d4df056c7c1349f1a54f97c36c3cfcd6": {
        "action_id": "d4df056c7c1349f1a54f97c36c3cfcd6",
        "loading_indicator": "none",
        "loading_text": null,
        "success_message": null,
        "error_message": null,
        "ui_updates": []
      },
      "8f6bffbc3c68494bab12ecae0044760d": {
        "action_id": "8f6bffbc3c68494bab12ecae0044760d",
        "loading_indicator": "none",
        "loading_text": null,
        "success_message": null,
        "error_message": null,
        "ui_updates": []
      },
      "29af1f75db0f432d919fbb1758ad644f": {
        "action_id": "29af1f75db0f432d919fbb1758ad644f",
        "loading_indicator": "none",
        "loading_text": null,
        "success_message": null,
        "error_message": null,
        "ui_updates": []
      },
      "6c174ab864254471819246febbe4676d": {
        "action_id": "6c174ab864254471819246febbe4676d",
        "loading_indicator": "none",
        "loading_text": null,
        "success_message": "Copied!",
        "error_message": "Failed to copy",
        "ui_updates": []
      },
      "24f861fb08c94851b5936a85488c38b0": {
        "action_id": "24f861fb08c94851b5936a85488c38b0",
        "loading_indicator": "spinner",
        "loading_text": null,
        "success_message": null,
        "error_message": "Failed to load history",
        "ui_updates": []
      },
      "70a95565e38d48959b5703a093efd527": {
        "action_id": "70a95565e38d48959b5703a093efd527",
        "loading_indicator": "none",
        "loading_text": null,
        "success_message": null,
        "error_message": null,
        "ui_updates": []
      },
      "26d94ac02cb4416b96ae9dd9a170efd1": {
        "action_id": "26d94ac02cb4416b96ae9dd9a170efd1",
        "loading_indicator": "spinner",
        "loading_text": null,
        "success_message": "History cleared",
        "error_message": "Failed to clear history",
        "ui_updates": []
      },
      "357821927f0c4e4cb4d488a952192834": {
        "action_id": "357821927f0c4e4cb4d488a952192834",
        "loading_indicator": "none",
        "loading_text": null,
        "success_message": null,
        "error_message": null,
        "ui_updates": []
      },
      "191d5803f8da4dd1a41589a98d638d9b": {
        "action_id": "191d5803f8da4dd1a41589a98d638d9b",
        "loading_indicator": "spinner",
        "loading_text": null,
        "success_message": null,
        "error_message": "Failed to initialize session",
        "ui_updates": []
      }
    }
  },
  "component_ir": {
    "library": "antd",
    "theme": {
      "primaryColor": "#1677ff",
      "secondaryColor": "#333333",
      "successColor": null,
      "warningColor": null,
      "errorColor": null,
      "fontFamily": "sans-serif",
      "fontSize": null,
      "borderRadius": 8
    },
    "components": {
      "main_container": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "className": "calculator-page"
        },
        "dynamic_props": {},
        "styles": {
          "display": "flex",
          "flexDirection": "column",
          "alignItems": "center",
          "justifyContent": "center",
          "minHeight": "100vh",
          "width": "100%",
          "padding": "16px",
          "backgroundColor": "#f5f5f5"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "calculator_wrapper": {
        "type": "Card",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "bordered": true,
          "className": "calculator-card"
        },
        "dynamic_props": {},
        "styles": {
          "width": "100%",
          "maxWidth": "400px",
          "borderRadius": "16px",
          "boxShadow": "0 8px 32px rgba(0,0,0,0.12)",
          "overflow": "hidden"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "header_row": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "dynamic_props": {},
        "styles": {
          "display": "flex",
          "justifyContent": "space-between",
          "alignItems": "center",
          "padding": "8px 16px 0 16px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "header_title": {
        "type": "Typography.Text",
        "label": "Calculator",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "strong": true
        },
        "dynamic_props": {},
        "styles": {
          "fontSize": "16px",
          "color": "#666"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_history_toggle": {
        "type": "Button",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": "openHistoryDrawer",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "text",
          "icon": "ClockCircleOutlined",
          "shape": "circle",
          "aria-label": "Toggle history panel"
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "44px",
          "fontSize": "18px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "display_section": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "role": "region",
          "aria-label": "Calculator display"
        },
        "dynamic_props": {},
        "styles": {
          "padding": "16px",
          "textAlign": "right",
          "minHeight": "120px",
          "display": "flex",
          "flexDirection": "column",
          "justifyContent": "flex-end"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "expression_display": {
        "type": "Typography.Text",
        "label": null,
        "description": null,
        "bind": "derived.displayExpression",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "secondary",
          "aria-label": "Current expression"
        },
        "dynamic_props": {},
        "styles": {
          "fontSize": "16px",
          "minHeight": "24px",
          "color": "#999",
          "textAlign": "right",
          "display": "block"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "main_display_row": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "dynamic_props": {},
        "styles": {
          "display": "flex",
          "alignItems": "center",
          "justifyContent": "flex-end",
          "gap": "8px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_copy": {
        "type": "Tooltip",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": "copyResult",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "title": "Copy result",
          "children_type": "Button",
          "children_props": {
            "type": "text",
            "icon": "CopyOutlined",
            "size": "small",
            "aria-label": "Copy result to clipboard"
          }
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "44px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "main_display": {
        "type": "Typography.Title",
        "label": null,
        "description": null,
        "bind": "appContext.calculatorState.currentDisplay",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "level": 2,
          "aria-live": "polite",
          "aria-label": "Calculator result"
        },
        "dynamic_props": {},
        "styles": {
          "margin": "0",
          "fontSize": "clamp(24px, 8vw, 48px)",
          "fontWeight": "300",
          "textAlign": "right",
          "overflow": "hidden",
          "textOverflow": "ellipsis",
          "whiteSpace": "nowrap",
          "flex": "1",
          "lineHeight": "1.2"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "memory_row": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "role": "group",
          "aria-label": "Memory functions"
        },
        "dynamic_props": {},
        "styles": {
          "display": "grid",
          "gridTemplateColumns": "repeat(4, 1fr)",
          "gap": "4px",
          "padding": "4px 16px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_mc": {
        "type": "Button",
        "label": "MC",
        "description": null,
        "bind": null,
        "onClick": "pressMemoryClear",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "text",
          "size": "small",
          "aria-label": "Memory Clear"
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "44px",
          "fontSize": "13px",
          "fontWeight": "500",
          "color": "#666"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_mr": {
        "type": "Button",
        "label": "MR",
        "description": null,
        "bind": null,
        "onClick": "pressMemoryRecall",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "text",
          "size": "small",
          "aria-label": "Memory Recall"
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "44px",
          "fontSize": "13px",
          "fontWeight": "500",
          "color": "#666"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_mplus": {
        "type": "Button",
        "label": "M+",
        "description": null,
        "bind": null,
        "onClick": "pressMemoryAdd",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "text",
          "size": "small",
          "aria-label": "Memory Add"
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "44px",
          "fontSize": "13px",
          "fontWeight": "500",
          "color": "#666"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_mminus": {
        "type": "Button",
        "label": "M-",
        "description": null,
        "bind": null,
        "onClick": "pressMemorySubtract",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "text",
          "size": "small",
          "aria-label": "Memory Subtract"
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "44px",
          "fontSize": "13px",
          "fontWeight": "500",
          "color": "#666"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "memory_indicator": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": "derived.hasMemoryValue",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "aria-label": "Memory indicator"
        },
        "dynamic_props": {},
        "styles": {
          "width": "6px",
          "height": "6px",
          "borderRadius": "50%",
          "backgroundColor": "#1677ff",
          "marginLeft": "16px",
          "marginBottom": "4px",
          "visibility": "visible"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "button_grid": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "role": "group",
          "aria-label": "Calculator buttons"
        },
        "dynamic_props": {},
        "styles": {
          "display": "grid",
          "gridTemplateColumns": "repeat(4, 1fr)",
          "gap": "8px",
          "padding": "8px 16px 16px 16px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_ac": {
        "type": "Button",
        "label": "AC",
        "description": null,
        "bind": null,
        "onClick": "pressAllClear",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "aria-label": "All Clear",
          "type": "default"
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "56px",
          "fontSize": "16px",
          "fontWeight": "500",
          "borderRadius": "12px",
          "backgroundColor": "#e0e0e0",
          "border": "none",
          "transition": "all 300ms ease"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_ce": {
        "type": "Button",
        "label": "CE",
        "description": null,
        "bind": null,
        "onClick": "pressClearEntry",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "aria-label": "Clear Entry",
          "type": "default"
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "56px",
          "fontSize": "16px",
          "fontWeight": "500",
          "borderRadius": "12px",
          "backgroundColor": "#e0e0e0",
          "border": "none",
          "transition": "all 300ms ease"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_backspace": {
        "type": "Button",
        "label": "⌫",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "aria-label": "Backspace",
          "type": "default"
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "56px",
          "fontSize": "18px",
          "fontWeight": "500",
          "borderRadius": "12px",
          "backgroundColor": "#e0e0e0",
          "border": "none",
          "transition": "all 300ms ease"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_divide": {
        "type": "Button",
        "label": "÷",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "aria-label": "Divide",
          "type": "primary",
          "ghost": true
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "56px",
          "fontSize": "20px",
          "fontWeight": "500",
          "borderRadius": "12px",
          "borderColor": "#1677ff",
          "color": "#1677ff",
          "transition": "all 300ms ease"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_7": {
        "type": "Button",
        "label": "7",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "aria-label": "7",
          "type": "default"
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "56px",
          "fontSize": "20px",
          "fontWeight": "400",
          "borderRadius": "12px",
          "backgroundColor": "#f8f8f8",
          "border": "1px solid #e8e8e8",
          "transition": "all 300ms ease"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_8": {
        "type": "Button",
        "label": "8",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "aria-label": "8",
          "type": "default"
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "56px",
          "fontSize": "20px",
          "fontWeight": "400",
          "borderRadius": "12px",
          "backgroundColor": "#f8f8f8",
          "border": "1px solid #e8e8e8",
          "transition": "all 300ms ease"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_9": {
        "type": "Button",
        "label": "9",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "aria-label": "9",
          "type": "default"
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "56px",
          "fontSize": "20px",
          "fontWeight": "400",
          "borderRadius": "12px",
          "backgroundColor": "#f8f8f8",
          "border": "1px solid #e8e8e8",
          "transition": "all 300ms ease"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_multiply": {
        "type": "Button",
        "label": "×",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "aria-label": "Multiply",
          "type": "primary",
          "ghost": true
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "56px",
          "fontSize": "20px",
          "fontWeight": "500",
          "borderRadius": "12px",
          "borderColor": "#1677ff",
          "color": "#1677ff",
          "transition": "all 300ms ease"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_4": {
        "type": "Button",
        "label": "4",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "aria-label": "4",
          "type": "default"
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "56px",
          "fontSize": "20px",
          "fontWeight": "400",
          "borderRadius": "12px",
          "backgroundColor": "#f8f8f8",
          "border": "1px solid #e8e8e8",
          "transition": "all 300ms ease"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_5": {
        "type": "Button",
        "label": "5",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "aria-label": "5",
          "type": "default"
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "56px",
          "fontSize": "20px",
          "fontWeight": "400",
          "borderRadius": "12px",
          "backgroundColor": "#f8f8f8",
          "border": "1px solid #e8e8e8",
          "transition": "all 300ms ease"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_6": {
        "type": "Button",
        "label": "6",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "aria-label": "6",
          "type": "default"
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "56px",
          "fontSize": "20px",
          "fontWeight": "400",
          "borderRadius": "12px",
          "backgroundColor": "#f8f8f8",
          "border": "1px solid #e8e8e8",
          "transition": "all 300ms ease"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_subtract": {
        "type": "Button",
        "label": "−",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "aria-label": "Subtract",
          "type": "primary",
          "ghost": true
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "56px",
          "fontSize": "20px",
          "fontWeight": "500",
          "borderRadius": "12px",
          "borderColor": "#1677ff",
          "color": "#1677ff",
          "transition": "all 300ms ease"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_1": {
        "type": "Button",
        "label": "1",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "aria-label": "1",
          "type": "default"
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "56px",
          "fontSize": "20px",
          "fontWeight": "400",
          "borderRadius": "12px",
          "backgroundColor": "#f8f8f8",
          "border": "1px solid #e8e8e8",
          "transition": "all 300ms ease"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_2": {
        "type": "Button",
        "label": "2",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "aria-label": "2",
          "type": "default"
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "56px",
          "fontSize": "20px",
          "fontWeight": "400",
          "borderRadius": "12px",
          "backgroundColor": "#f8f8f8",
          "border": "1px solid #e8e8e8",
          "transition": "all 300ms ease"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_3": {
        "type": "Button",
        "label": "3",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "aria-label": "3",
          "type": "default"
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "56px",
          "fontSize": "20px",
          "fontWeight": "400",
          "borderRadius": "12px",
          "backgroundColor": "#f8f8f8",
          "border": "1px solid #e8e8e8",
          "transition": "all 300ms ease"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_add": {
        "type": "Button",
        "label": "+",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "aria-label": "Add",
          "type": "primary",
          "ghost": true
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "56px",
          "fontSize": "20px",
          "fontWeight": "500",
          "borderRadius": "12px",
          "borderColor": "#1677ff",
          "color": "#1677ff",
          "transition": "all 300ms ease"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_toggle_sign": {
        "type": "Button",
        "label": "+/−",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "aria-label": "Toggle sign",
          "type": "default"
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "56px",
          "fontSize": "16px",
          "fontWeight": "400",
          "borderRadius": "12px",
          "backgroundColor": "#f8f8f8",
          "border": "1px solid #e8e8e8",
          "transition": "all 300ms ease"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_0": {
        "type": "Button",
        "label": "0",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "aria-label": "0",
          "type": "default"
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "56px",
          "fontSize": "20px",
          "fontWeight": "400",
          "borderRadius": "12px",
          "backgroundColor": "#f8f8f8",
          "border": "1px solid #e8e8e8",
          "transition": "all 300ms ease"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_decimal": {
        "type": "Button",
        "label": ".",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "aria-label": "Decimal point",
          "type": "default"
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "56px",
          "fontSize": "20px",
          "fontWeight": "400",
          "borderRadius": "12px",
          "backgroundColor": "#f8f8f8",
          "border": "1px solid #e8e8e8",
          "transition": "all 300ms ease"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_percent": {
        "type": "Button",
        "label": "%",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "aria-label": "Percentage",
          "type": "default"
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "56px",
          "fontSize": "16px",
          "fontWeight": "500",
          "borderRadius": "12px",
          "backgroundColor": "#e0e0e0",
          "border": "none",
          "transition": "all 300ms ease"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_equals": {
        "type": "Button",
        "label": "=",
        "description": null,
        "bind": null,
        "onClick": "pressEquals",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "aria-label": "Equals",
          "type": "primary"
        },
        "dynamic_props": {},
        "styles": {
          "minWidth": "44px",
          "minHeight": "56px",
          "fontSize": "24px",
          "fontWeight": "500",
          "borderRadius": "12px",
          "backgroundColor": "#1677ff",
          "color": "#ffffff",
          "border": "none",
          "transition": "all 300ms ease"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "history_drawer": {
        "type": "Drawer",
        "label": "History",
        "description": null,
        "bind": "state.historyDrawerVisible",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "title": "Calculation History",
          "placement": "right",
          "width": 360,
          "closable": true,
          "onClose": "closeHistoryDrawer",
          "open": "$state.historyDrawerVisible"
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "history_list": {
        "type": "List",
        "label": null,
        "description": null,
        "bind": "derived.formattedHistory",
        "onClick": "loadHistoryResult",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "dataSource": "$derived.formattedHistory",
          "renderItem": "history_item",
          "locale": {
            "emptyText": "No calculations yet"
          },
          "size": "small"
        },
        "dynamic_props": {},
        "styles": {
          "flex": "1",
          "overflow": "auto"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "history_item": {
        "type": "List.Item",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": "loadHistoryResult",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "className": "history-entry",
          "style_cursor": "pointer"
        },
        "dynamic_props": {},
        "styles": {
          "cursor": "pointer",
          "padding": "12px 0",
          "borderBottom": "1px solid #f0f0f0",
          "transition": "background-color 300ms ease"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "history_expression_text": {
        "type": "Typography.Text",
        "label": null,
        "description": null,
        "bind": "item.expression",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "strong": true
        },
        "dynamic_props": {},
        "styles": {
          "fontSize": "14px",
          "display": "block"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "history_timestamp_text": {
        "type": "Typography.Text",
        "label": null,
        "description": null,
        "bind": "item.timestamp",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "secondary"
        },
        "dynamic_props": {},
        "styles": {
          "fontSize": "12px",
          "display": "block"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "btn_clear_history": {
        "type": "Button",
        "label": "Clear History",
        "description": null,
        "bind": null,
        "onClick": "clearSessionHistory",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "default",
          "danger": true,
          "block": true,
          "icon": "DeleteOutlined",
          "aria-label": "Clear all history"
        },
        "dynamic_props": {},
        "styles": {
          "marginTop": "16px",
          "minHeight": "44px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "history_drawer_content": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "dynamic_props": {},
        "styles": {
          "display": "flex",
          "flexDirection": "column",
          "height": "100%"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      }
    }
  },
  "layout_ir": {
    "root": "main_container",
    "children": {
      "main_container": [
        "calculator_wrapper",
        "history_drawer"
      ],
      "calculator_wrapper": [
        "header_row",
        "display_section",
        "memory_indicator",
        "memory_row",
        "button_grid"
      ],
      "header_row": [
        "header_title",
        "btn_history_toggle"
      ],
      "display_section": [
        "expression_display",
        "main_display_row"
      ],
      "main_display_row": [
        "btn_copy",
        "main_display"
      ],
      "memory_row": [
        "btn_mc",
        "btn_mr",
        "btn_mplus",
        "btn_mminus"
      ],
      "button_grid": [
        "btn_ac",
        "btn_ce",
        "btn_backspace",
        "btn_divide",
        "btn_7",
        "btn_8",
        "btn_9",
        "btn_multiply",
        "btn_4",
        "btn_5",
        "btn_6",
        "btn_subtract",
        "btn_1",
        "btn_2",
        "btn_3",
        "btn_add",
        "btn_toggle_sign",
        "btn_0",
        "btn_decimal",
        "btn_percent",
        "btn_equals"
      ],
      "history_drawer": [
        "history_drawer_content"
      ],
      "history_drawer_content": [
        "history_list",
        "btn_clear_history"
      ],
      "history_list": [
        "history_item"
      ],
      "history_item": [
        "history_expression_text",
        "history_timestamp_text"
      ]
    },
    "layout": {
      "main_container": {
        "type": "vertical",
        "gap": 0,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "calculator_wrapper": {
        "type": "vertical",
        "gap": 0,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "header_row": {
        "type": "horizontal",
        "gap": 8,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "display_section": {
        "type": "vertical",
        "gap": 4,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "main_display_row": {
        "type": "horizontal",
        "gap": 8,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "memory_row": {
        "type": "grid",
        "gap": 4,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "button_grid": {
        "type": "grid",
        "gap": 8,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "history_drawer_content": {
        "type": "vertical",
        "gap": 8,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "history_item": {
        "type": "vertical",
        "gap": 4,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      }
    },
    "layout_zones": [
      {
        "zone_id": "calculator_center",
        "component": "calculator_wrapper",
        "anchor": "center",
        "size_hint": "400px",
        "z_layer": "base",
        "notes": "Main calculator card centered on page"
      },
      {
        "zone_id": "history_panel",
        "component": "history_drawer",
        "anchor": "top-left",
        "size_hint": "360px",
        "z_layer": "overlay",
        "notes": "Slide-out history drawer on right side"
      }
    ],
    "responsive_overrides": []
  },
  "navigation_ir": {
    "tabs": [],
    "modals": {},
    "drawers": {},
    "routes": [],
    "breadcrumb": null,
    "default_tab": null
  },
  "realtime_ir": {
    "timers": {},
    "polling": {}
  },
  "metadata": {
    "ir_version": "3.5",
    "generated_at": "",
    "source_prompt": null,
    "schema_session_id": null,
    "warnings": []
  },
  "page_data_contract": null,
  "schema_ir": null
}
