@solomei-ai/intent 1.9.3 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -92,7 +92,36 @@ Once loaded, access the module from the global `window.Intent` namespace:
92
92
 
93
93
 
94
94
  ## Managing consent & geolocation flags
95
- You can pass flags to `initIntent` or toggle them at runtime with setFlag:
95
+
96
+ ### Recommended: Type-Safe Functions (v1.9.4+)
97
+
98
+ Use the dedicated helper functions for better type safety and IDE support:
99
+
100
+ ```ts
101
+ import {setConsent, setGeo, setDebug} from '@solomei-ai/intent';
102
+
103
+ // Grant or revoke consent
104
+ setConsent(true); // granted
105
+ setConsent(false); // disabled
106
+
107
+ // Enable or disable device geolocation capture
108
+ setGeo(true); // enabled
109
+ setGeo(false); // disabled
110
+
111
+ // Enable or disable debug logging
112
+ setDebug(true); // enabled
113
+ setDebug(false); // disabled
114
+ ```
115
+
116
+ **Benefits of type-safe functions:**
117
+ - Clear, self-documenting API
118
+ - Better IDE autocomplete and type checking
119
+ - Prevents typos in flag names
120
+ - Explicit boolean-only parameters
121
+
122
+ ### Alternative: Generic setFlag Function (Deprecated)
123
+
124
+ The `setFlag` function remains available for backwards compatibility:
96
125
 
97
126
  ```ts
98
127
  import {setFlag} from '@solomei-ai/intent';
@@ -109,8 +138,79 @@ setFlag('intent:geo', false); // disabled
109
138
  setFlag('intent:debug', true); // enabled
110
139
  setFlag('intent:debug', false); // disabled
111
140
  ```
141
+
142
+ > **⚠️ URGENT DEPRECATION WARNING:** The **entire `setFlag` function will be removed in v2.0.0 (February 2026 - approximately 2 months)**. All users must migrate to the type-safe functions (`setConsent`, `setGeo`, `setDebug`) before upgrading to v2.0.0. See the Migration Guide below for details.
143
+
144
+ ---
145
+
146
+ **Behavior:**
112
147
  - When consent is granted, the tracker maintains a first-party cookie `intent_sid`.
113
148
  - If consent is revoked, the tracker clears `intent_sid` and stops sending events.
149
+
150
+ ### Migration Guide
151
+
152
+ **Upgrading from v1.9.3 and earlier:**
153
+
154
+ The new type-safe functions are recommended but optional. Your existing code using `setFlag` will continue to work without any changes:
155
+
156
+ ```ts
157
+ // ✅ This still works (backwards compatible)
158
+ setFlag('intent:consent', true);
159
+
160
+ // ✅ Recommended: Migrate to type-safe functions for better DX
161
+ setConsent(true);
162
+ ```
163
+
164
+ No breaking changes - all existing code remains functional.
165
+
166
+ **⚠️ URGENT: Deprecation Timeline**
167
+
168
+ - **v1.9.4 (Current - December 2025)**: `setFlag` function is deprecated but still supported
169
+ - **v2.0.0 (February 2026 - ~2 months)**: `setFlag` function will be **completely removed**
170
+
171
+ **⚠️ You have approximately 2 months to complete migration before v2.0.0**
172
+
173
+ **Migration Required Before v2.0.0:**
174
+
175
+ All code using `setFlag` must be migrated to the type-safe alternatives:
176
+
177
+ ```ts
178
+ // ❌ Will NOT work in v2.0.0 - setFlag will be removed
179
+ setFlag('intent:consent', true);
180
+ setFlag('intent:consent', 'granted');
181
+ setFlag('intent:geo', false);
182
+ setFlag('intent:debug', true);
183
+
184
+ // ✅ REQUIRED migration for v2.0.0
185
+ setConsent(true); // replaces setFlag('intent:consent', true)
186
+ setGeo(false); // replaces setFlag('intent:geo', false)
187
+ setDebug(true); // replaces setFlag('intent:debug', true)
188
+ ```
189
+
190
+ **Migration Steps:**
191
+
192
+ 1. Find all uses of `setFlag` in your codebase
193
+ 2. Replace each call with the appropriate type-safe function:
194
+ - `setFlag('intent:consent', ...)` → `setConsent(...)`
195
+ - `setFlag('intent:geo', ...)` → `setGeo(...)`
196
+ - `setFlag('intent:debug', ...)` → `setDebug(...)`
197
+ 3. If you were using custom flag names, you'll need to find an alternative solution or open an issue to discuss your use case
198
+
199
+ **Search & Replace Examples:**
200
+
201
+ ```bash
202
+ # Find all uses of setFlag
203
+ grep -r "setFlag" your-codebase/
204
+
205
+ # Example replacements:
206
+ setFlag('intent:consent', true) → setConsent(true)
207
+ setFlag('intent:consent', false) → setConsent(false)
208
+ setFlag('intent:geo', true) → setGeo(true)
209
+ setFlag('intent:geo', false) → setGeo(false)
210
+ setFlag('intent:debug', true) → setDebug(true)
211
+ setFlag('intent:debug', false) → setDebug(false)
212
+ ```
213
+
114
214
  ---
115
215
 
116
216
  ## Debug Logging
@@ -130,12 +230,17 @@ initIntent({
130
230
  Or toggle debug logging at runtime:
131
231
 
132
232
  ```ts
133
- import {setFlag} from '@solomei-ai/intent';
233
+ import {setDebug} from '@solomei-ai/intent';
134
234
 
135
- // Enable debug logging
136
- setFlag('intent:debug', true);
235
+ // Enable debug logging (recommended - type-safe)
236
+ setDebug(true);
137
237
 
138
238
  // Disable debug logging
239
+ setDebug(false);
240
+
241
+ // Backwards compatible: using setFlag still works
242
+ import {setFlag} from '@solomei-ai/intent';
243
+ setFlag('intent:debug', true);
139
244
  setFlag('intent:debug', false);
140
245
  ```
141
246
 
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * © 2025 Solomei AI SRL. Proprietary and confidential.
3
3
  */
4
- import t from"html2canvas-pro";import e from"js-cookie";function n(t,e){t-=249;return s()[t]}async function o(){const t=n,e=[];let o=t(260);if(function(t){const e=n;return e(357)in t&&typeof t.connection!==e(333)}(navigator)){const n=navigator[t(357)];n?.effectiveType&&e[t(276)](n[t(330)]),typeof n?.downlink===t(343)&&e[t(276)]("~"+n.downlink+t(300)),typeof n?.[t(325)]===t(343)&&e[t(276)](n[t(325)]+t(307)),n?.[t(319)]&&e[t(276)](t(319))}else{const i=function(t=20){const e=n,o=performance[e(365)](e(270))[e(256)](t=>t[e(340)]===e(270)),i=o?Math.max(0,o[e(322)]-o.requestStart):void 0,a=performance[e(365)](e(358))[e(347)](t=>t[e(340)]===e(358));let r=0,c=0;for(const n of a[e(295)](0,Math[e(262)](0,t))){const t=n[e(352)]>0?n.encodedBodySize:n[e(293)]>0?n[e(293)]:0,o=n[e(309)];t>0&&o>0&&Number[e(249)](o)&&(r+=t,c+=o)}const s=c>0?8*r/c:void 0;return{downlinkMbps:typeof s===e(343)?s/1e3:void 0,rttMs:i}}();typeof i[t(321)]===t(343)&&e[t(276)]("~"+i.downlinkMbps[t(279)](1)+t(300)),typeof i.rttMs===t(343)&&e[t(276)]("TTFB ~"+Math[t(349)](i[t(269)])+t(307)),o=t(354)}const i=performance[t(365)](t(270))[t(256)](e=>"navigation"===e[t(340)]);if(i){const n=Math[t(262)](0,i.responseStart-i[t(356)]);!e[t(320)](e=>e[t(337)](t(344)))&&e[t(276)](t(334)+Math[t(349)](n)+t(307))}return e[t(265)]?t(292)+e[t(271)](", ")+" ("+o+")":void 0}function i(){const t=n;if(!function(t){const e=n;return e(355)in t&&typeof t[e(355)]!==e(333)}(navigator))return;const e=navigator[t(355)],o=Array[t(332)](e[t(255)])?e[t(255)].map(e=>e[t(336)]+" "+e[t(342)])[t(271)](", "):void 0,i=e[t(277)]?""+e[t(277)]+(e[t(282)]?t(363):""):void 0;return[o&&t(335)+o,i&&t(278)+i][t(347)](Boolean)[t(271)](t(308))||void 0}async function a(t=400){const e=n;if(e(304)in window&&window.isSecureContext)return new Promise(o=>{const i=e;let a=!1;const r=t=>{const e=n,i=typeof t.beta===e(343)?t[e(362)]:void 0,c=typeof t.gamma===e(343)?t[e(317)]:void 0;if(void 0===i||void 0===c)return;if(a)return;a=!0,window.removeEventListener(e(366),r);const s=function(t,e){const o=n,i=Math.abs(t),a=Math[o(311)](e);return i<15&&a<15?o(296):i>=60?"upright":o(274)}(i,c);o("Tilt: "+s+" (β "+Math.round(i)+e(350)+Math[e(349)](c)+"°)")};window[i(284)](()=>{const t=i;a||(a=!0,window[t(331)](t(366),r),o(void 0))},t),window[i(360)](i(366),r,{passive:!0})})}async function r(){const t=n;var e;if("getBattery"in(e=navigator)&&"function"==typeof e[n(327)])try{const e=await navigator[t(327)](),n=Math[t(349)](100*e.level),o=[(Number[t(249)](n)?n:0)+"%",e[t(254)]?"charging":t(346)];return t(290)+o[t(271)](", ")}catch{}}async function c(){const t=n,e=(new(Intl[t(316)]))[t(338)]()[t(302)],c=function(t){const e=n,o=t<=0?"+":"-",i=Math.abs(t);return""+o+String(Math[e(306)](i/60)).padStart(2,"0")+":"+String(i%60)[e(266)](2,"0")}((new Date).getTimezoneOffset()),s=[];s.push(t(289)+navigator[t(348)]),navigator[t(275)]?.[t(265)]&&s[t(276)](t(263)+navigator[t(275)].join(", ")),s[t(276)]("User agent: "+navigator[t(272)]);const d=i();d&&s[t(276)](d),s[t(276)](t(351)+e+t(315)+c+")"),s.push("Local time: "+(new Date)[t(261)]());const l=window[t(326)]||1;s[t(276)]("Screen: "+screen.width+"x"+screen[t(353)]+" @"+l+t(303)+screen.availWidth+"x"+screen[t(314)]+", "+screen[t(341)]+t(310));const u=screen[t(339)]&&t(286)in screen[t(339)]?screen[t(339)].type:void 0;s[t(276)](t(287)+window[t(329)]+"x"+window[t(281)]+(u?t(364)+u:"")),s[t(276)](t(318)+navigator[t(250)]+t(294));const f=await o();f&&s[t(276)](f),s[t(276)](function(){const t=n,e=typeof matchMedia===t(305)&&matchMedia("(pointer: coarse)")[t(298)],o=typeof matchMedia===t(305)&&matchMedia(t(359))[t(298)],i=t(e?291:o?324:323),a=navigator.maxTouchPoints;return t(268)+i+", maxTouchPoints "+a}());const m=await r();m&&s[t(276)](m),s[t(276)]("CookiesEnabled: "+(navigator[t(301)]?t(259):"no")+t(264)+(navigator.doNotTrack??"n/a")),s[t(276)]("Online: "+(navigator[t(283)]?"yes":"no")),document[t(257)]&&s.push(t(299)+document[t(257)]),s.push(function(){const t=n,e=typeof matchMedia===t(305)&&matchMedia("(display-mode: standalone)")[t(298)],o=Boolean(navigator[t(328)]?.controller);return t(297)+(o?"SW-controlled":t(273))+", display-mode standalone: "+(e?t(259):"no")}());const p=await a();p&&s[t(276)](p);const g=localStorage[t(251)](t(288))===t(313);return s[t(276)](g?"Device geolocation: enabled":t(280)),s[t(271)](t(308))}function s(){const t=["TTFB","3033225rOpEUX","not charging","filter","language","round","°, γ ","Timezone: ","encodedBodySize","height","inferred","userAgentData","requestStart","connection","resource","(pointer: fine)","addEventListener","12769552dUfEfa","beta"," (mobile)",", orientation ","getEntriesByType","deviceorientation","isFinite","hardwareConcurrency","getItem","18639PVkzfJ","759821hnOSOR","charging","brands","find","referrer","722894oLPwxC","yes","browser API","toString","max","Languages: ","; DNT: ","length","padStart","1506106gkeFYX","Pointer/Touch: ","rttMs","navigation","join","userAgent","no SW","reclined","languages","push","platform","Platform: ","toFixed","Device geolocation: disabled","innerHeight","mobile","onLine","setTimeout","80USNkSj","type","Viewport: ","intent:geo","Language: ","Battery: ","coarse","Network: ","transferSize"," cores","slice","flat","PWA: ","matches","Referrer: "," Mbps","cookieEnabled","timeZone","x (avail ","DeviceOrientationEvent","function","floor"," ms"," | ","duration","-bit)","abs","5696922gPaKkK","enabled","availHeight"," (UTC","DateTimeFormat","gamma","CPU: ","saveData","some","downlinkMbps","responseStart","unknown","fine","rtt","devicePixelRatio","getBattery","serviceWorker","innerWidth","effectiveType","removeEventListener","isArray","undefined","TTFB ~","UA brands: ","brand","startsWith","resolvedOptions","orientation","entryType","colorDepth","version","number"];return(s=function(){return t})()}!function(){const t=n,e=s();for(;;)try{if(478350===-parseInt(t(253))/1+-parseInt(t(258))/2+parseInt(t(252))/3*(-parseInt(t(285))/4)+-parseInt(t(345))/5+parseInt(t(312))/6+-parseInt(t(267))/7+parseInt(t(361))/8)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const d=Z;!function(){const t=Z,e=G();for(;;)try{if(128767===parseInt(t(481))/1+-parseInt(t(636))/2+-parseInt(t(590))/3+-parseInt(t(531))/4+-parseInt(t(647))/5+parseInt(t(559))/6+parseInt(t(631))/7)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();let l,u="",f=0;let m;const p="intent:consent",g="intent:geo",w=d(480);let h=!1,y=!1,v=!1,b=!1,S=!1,T=!1;const x=d(492),E=d(668),I=d(608),M=d(493),L=d(600),k=d(582),A=[d(598),d(521),"a",'input[type="submit"]',d(652),d(611),d(535),"[onclick]"][d(541)](","),N=d(508),D=d(536),H=new Set([d(614),d(563),d(602),d(501),d(482),d(483),d(594),"tel",d(655),d(625),d(653),d(534),d(539),"address-line3",d(499),"address-level2",d(565),d(567),d(605),d(497),d(588),d(542),d(660),d(522),d(523),d(537),d(658),d(616),"cc-exp-year","cc-csc",d(525),d(606),d(478),d(651),d(532),d(490),d(615)]);function B(...t){const e=d;try{typeof localStorage!==e(656)&&localStorage.getItem(w)===e(505)&&console[e(627)](...t)}catch{}}function O(t){return"<"+function(t){const e=d,n=(t[e(477)]?.(D)??"").trim();if(n)return n;const o=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?(t.autocomplete||"").toLowerCase()[e(514)]().split(/\s+/).filter(Boolean):[];return t instanceof HTMLInputElement&&"password"===t[e(560)]?e(609):o.some(t=>t[e(640)](e(512)))?e(607):o[e(545)](t=>["name",e(563),e(501),e(602),e(542),e(660),e(523)][e(597)](t))?e(491):o.includes(e(594))?e(556):o[e(597)]("tel")?"Phone":o.some(t=>t[e(640)](e(606)))?e(496):o.includes(e(490))?e(489):o.some(t=>[e(653),e(534),e(539),"address-line3","address-level1",e(511),e(565),e(567),e(588),e(605),e(497)][e(597)](t))?e(573):o[e(597)](e(655))||o.includes(e(625))?e(543):t.getAttribute?.(N)?.[e(589)]()===e(546)?e(581):e(517)}(t)+">"}function P(t){const e=d;return t.hasAttribute(e(555))||t.getAttribute(N)?.[e(589)]()===e(576)}function C(t){return!P(t)&&(!!function(t){const e=d,n=t[e(477)](N);return""===n||n?.[e(589)]()===e(546)}(t)||!!function(t){const e=d;if(t instanceof HTMLInputElement){if(t.type===e(485))return!0;if(t[e(560)]===e(504))return!1;const n=t[e(477)]("role");if(n&&n[e(589)]()===e(635))return!1;if((t[e(626)]||"")[e(589)]()[e(514)]().split(/\s+/)[e(552)](Boolean)[e(545)](t=>H[e(621)](t)))return!0}if(t instanceof HTMLTextAreaElement&&(t[e(626)]||"")[e(589)]().trim().split(/\s+/)[e(552)](Boolean)[e(545)](t=>H[e(621)](t)))return!0;return!1}(t))}const U=()=>localStorage[d(515)](p)===d(618);function F(t){return e[d(476)](t)}function j(t,n){const o=d,i=localStorage.getItem(L),a=null===i?void 0:Number(i),r=Number.isFinite(n)?Number(n):"number"==typeof a&&Number[o(642)](a)?a:2592e3,c=window[o(666)][o(502)]===o(612);e[o(603)](o(659),t,{expires:r/86400,path:"/",sameSite:"Lax",...c&&{secure:!0}})}function z(){const t=d;e[t(637)](t(659),{path:"/"})}function R(){const t=d,e=F(t(659));if(!U())return e&&z(),void(u="");e?u=e:(u=crypto[t(644)](),j(u))}function _(){return R(),U()&&Boolean(u)&&function(){const t=d;return Boolean(localStorage[t(515)](x)?.[t(514)]()[t(620)])}()}function W(){return!_()||v}async function J(e){return m&&await m,m=(async()=>{const n=Z;try{const o=performance[n(584)](),i=performance[n(584)](),a=function(t){const e=d,n=t[e(553)](!1);return n instanceof HTMLInputElement&&t instanceof HTMLInputElement?(Array.from(t.attributes)[e(549)](({name:t,value:e})=>{n.setAttribute(t,e)}),n[e(487)]=C(t)?O(t):t.value,t[e(610)]&&n[e(569)](e(610),""),n[e(524)]):n instanceof HTMLTextAreaElement&&t instanceof HTMLTextAreaElement?(Array[e(638)](t.attributes)[e(549)](({name:t,value:o})=>{n[e(569)](t,o)}),n.value=C(t)?O(t):t.value,t[e(610)]&&n.setAttribute(e(610),""),n[e(524)]):t[e(524)]}(e),r=performance[n(584)]();B("[Timing] serialize: "+(r-i).toFixed(2)+"ms");const c=e[n(533)](),s=performance.now(),l={left:window[n(503)],top:window[n(564)],right:window.scrollX+window[n(506)],bottom:window[n(564)]+window.innerHeight},u=await t(document[n(528)],{useCORS:!0,x:window[n(503)],y:window.scrollY,width:window[n(506)],height:window.innerHeight,scale:.6,logging:!1,onclone(t,e){const o=n,i=t.querySelectorAll("input, textarea");for(const t of i)if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){if(t.hasAttribute("data-html2canvas-ignore")||t[o(477)](N)?.[o(589)]()===o(576))continue;let e=!1;const n=t[o(477)](N);if((""===n||n?.[o(589)]()===o(546))&&(e=!0),t[o(560)]===o(485)&&(e=!0),!e){const n=(t[o(477)](o(626))||"")[o(589)]().trim()[o(479)](/\s+/).filter(Boolean);if("search"===t[o(560)]||t.getAttribute("role")?.[o(589)]()===o(635))continue;n[o(545)](t=>H[o(621)](t))&&(e=!0)}e&&(t[o(487)]=O(t))}},ignoreElements(t){const e=n;if(!(t instanceof Element))return!1;if(P(t))return!0;const o=t[e(533)](),i={left:o.left+window[e(503)],top:o.top+window[e(564)],right:o[e(529)]+window[e(503)],bottom:o[e(587)]+window[e(564)]},a=100;if(i[e(529)]<l[e(574)]-a||i[e(574)]>l[e(529)]+a||i[e(587)]<l[e(577)]-a||i[e(577)]>l[e(587)]+a){const n=window.getComputedStyle(t),{position:o}=n;if(o===e(495)||o===e(527)){const t=500;return i.right<l[e(574)]-t||i[e(574)]>l.right+t||i[e(587)]<l.top-t||i[e(577)]>l.bottom+t}return!0}return!1}}),f=performance[n(584)]()-s;B(n(558)+f[n(519)](2)+"ms");const m=performance.now(),p=u[n(596)](n(622),.8),g=performance.now()-m;B(n(498)+g.toFixed(2)+"ms");const w=performance.now();return B("[Timing] capture-total: "+(w-o).toFixed(2)+"ms"),{html:a,bbox:{x:c.x,y:c.y,w:c[n(518)],h:c[n(520)]},img:p}}finally{m=void 0}})(),m}function q(){const t=d,e=localStorage[t(515)](x),n={"Content-Type":t(639)};return e&&(n[t(530)]=e),u&&(n["x-intent-sid"]=u),n}async function Y(t){const e=d,n=(localStorage[e(515)](I)??M)+e(591),o=localStorage[e(515)](x)??void 0,i=JSON[e(570)]({...t,clientId:o});try{if((await fetch(n,{method:"POST",headers:q(),body:i,keepalive:!0,credentials:e(526)})).ok)return}catch{}try{await async function(t){const e=d,n=(localStorage[e(515)](I)??M)+e(507);if(!(await fetch(n,{method:e(667),headers:q(),body:JSON[e(570)](t),keepalive:!0,credentials:e(526),cache:e(516)})).ok)throw new Error(e(650))}(t)}catch{}}async function X(t,e,n,o){const i=d;if(!_())return;const a={...e,localTime:(new Date)[i(630)]()};(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&(a[i(487)]=C(n)?O(n):n.value);let r="",c={x:0,y:0,w:0,h:0},s="";const l=!(t===i(664)||t===i(657)||t===i(624)),u=Date[i(584)](),m=u-f>=0;let p=o;const g="click"===t||t===i(599)||t===i(509);l&&(g&&!p||!p&&m)&&(p=await J(n),f=u),p&&(r=p.html,c=p.bbox,s=p[i(645)]);const w=t===i(657)||t===i(624)||t===i(509),h={ts:Date.now(),event:t,props:a,html:w?"":r,bbox:c,img:s};await Y(h)}function Z(t,e){t-=475;return G()[t]}function G(){const t=["cc-exp-month","message","granted","lat","length","has","image/jpeg","focus","page-focus","organization-title","autocomplete","log","removeEventListener","hostname","toISOString","1069439oaNJMl","permissions","deviceGeoSent","min","searchbox","45370jsOqPh","remove","from","application/json","startsWith","title","isFinite","addEventListener","randomUUID","img","onLine","479955fUCJkz","altitude","hidden","pixel body fallback failed","bday-month",'input[type="button"]',"street-address","getCurrentPosition","organization","undefined","page-blur","cc-exp","intent_sid","cc-given-name","speed","code","referrer","scroll","entries","location","POST","intent:data-ip","pointerdown","heading","get","getAttribute","bday-day","split","intent:debug","207844nVfrBZ","nickname","username","INPUT","password","device","value","isSecureContext","Sex","sex","Name","intent:data-client-id","https://intent.callimacus.ai","push","fixed","Birthday","country-name","[Timing] jpeg-encoding: ","address-level1","closest","family-name","protocol","scrollX","search","enabled","innerWidth","/p.gif","data-intent-redact","pageview","hasFocus","address-level2","cc-","load","trim","getItem","no-store","Sensitive","width","toFixed","height","a[href]","cc-additional-name","cc-family-name","outerHTML","cc-type","omit","absolute","body","right","x-sl-access-token","687120qDRMsU","bday-year","getBoundingClientRect","address-line1",'[role="link"]',"data-intent-redact-label","cc-number","coords","address-line2","innerHeight","join","cc-name","Organization","keydown","some","mask","href","geolocation","forEach","tagName","blur","filter","cloneNode","UNKNOWN","data-html2canvas-ignore","Email","longitude","[Timing] html2canvas-pro: ","702636lxIjjD","type","intent","textContent","given-name","scrollY","address-level3","context","address-level4","querySelectorAll","setAttribute","stringify","lon","canSend","Address","left","PERMISSION_DENIED","ignore","top","max","visibilityState",'="mask"], [',"Redacted","__intent__sdk__initialized__","number","now","query","click","bottom","postal-code","toLowerCase","175512OiCRLe","/events","key","altitudeAccuracy","email","target","toDataURL","includes","button","input-submit","intent:data-sid-max-age","input, textarea","additional-name","set",'=""]',"country","bday","Credit card","intent:data-base-url","Password","disabled",'[role="button"]',"https:","latitude","name","webauthn"];return(G=function(){return t})()}function K(){const t=d;return localStorage[t(515)](g)===t(505)}async function V(t={}){const e=d;if(!_())return;const n=typeof t[e(619)]===e(583)&&"number"==typeof t[e(571)];if(n&&y)return;if(!n&&h)return;const o=localStorage[e(515)](E),i={context:await c()};o&&(i.ip=o);for(const[n,o]of Object[e(665)](t))i[n]=o;await X(e(566),i,document.body,{html:"",bbox:{x:0,y:0,w:0,h:0},img:""}),n?y=!0:h=!0}async function Q(){const t=d,e={canSend:_(),geoEnabled:K(),deviceGeoSent:y};if(!e[t(572)]||!e.geoEnabled||e[t(633)])return;if(!(t(548)in navigator))return;if(S)return;S=!0,v=!0;const n={enableHighAccuracy:!1,maximumAge:3e5,timeout:2e4};Date[t(584)]();try{await(navigator[t(632)]?.[t(585)]({name:t(548)}))}catch(t){}await new Promise(e=>{const o=t;let i=!1;const a=async(t,n,o)=>{const a=Z;i||(i=!0,Date[a(584)](),Number[a(642)](t)&&Number[a(642)](n)&&await V({lat:t,lon:n,source:a(486)}),S=!1,v=!1,T=!0,e())};navigator[o(548)][o(654)](t=>{const e=Z,n=t[e(538)];a(n[e(613)],n[e(557)],(n.accuracy,typeof n[e(648)]===e(583)&&n[e(648)],typeof n[e(593)]===e(583)&&n.altitudeAccuracy,typeof n[e(475)]===e(583)&&n[e(475)],typeof n[e(661)]===e(583)&&n.speed,t.timestamp,document[e(579)],document[e(510)]()))},t=>{const e=Z,n=t?.[e(662)];1===n?e(575):2===n||(3===n||e(554)),t?.[e(617)],navigator[e(646)],document[e(579)],document.hasFocus(),window[e(488)],location[e(502)],location[e(629)],a(void 0,void 0)},n)})}function $(){const t=d;if(b||!K()||y)return;b=!0;const e=()=>{const t=Z;window[t(628)](t(669),e,!0),window[t(628)](t(544),e,!0),Q()};window[t(643)](t(669),e,!0),window[t(643)](t(544),e,!0)}R();let tt=!document[d(649)]&&document[d(510)](),et=document[d(510)]();function nt(){const t=d;if(W())return;const e=!document.hidden&&document[t(510)]();e&&(et=!0),et||e?e!==tt&&(tt=e,X(e?"page-focus":t(657),{},document[t(528)])):tt=e}function ot(){const t=d;(function(){const t=globalThis;return!t[k]&&(Object.defineProperty(t,k,{value:!0,configurable:!1,enumerable:!1,writable:!1}),!0)})()&&(window[t(643)](t(513),()=>{const e=t;_()&&(V(),(window[e(488)]||"localhost"===location[e(629)])&&(K()&&$(),window.addEventListener(e(623),()=>{!y&&K()&&!S&&T&&Q()}),document[e(643)]("visibilitychange",()=>{!document.hidden&&!y&&K()&&!S&&T&&Q()})))}),window.addEventListener("storage",e=>{const n=t;e[n(592)]===p&&("granted"===localStorage[d(515)](p)?(h=!1,V(),K()&&$()):(h=!1,y=!1)),e[n(592)]===g&&(K()?$():y=!1)}),window[t(643)](t(513),()=>{const e=t;_()&&X(e(509),{url:window.location[e(547)],title:document[e(641)],ref:document[e(663)]},document[e(528)])}),addEventListener(t(669),function(t,e){let n=0;return(...o)=>{const i=Date[Z(584)]();i-n>=e&&(n=i,t(...o))}}(e=>{const n=t;if(W())return;const o=e[n(595)]instanceof Element?e[n(595)][n(500)](A):null;o instanceof HTMLElement&&(l=J(o))},50),{capture:!0,passive:!0}),addEventListener("click",async e=>{const n=t;if(W())return;if(!(e[n(595)]instanceof Element))return;const o=e[n(595)].closest(A);if(!(o instanceof HTMLElement))return;const i=function(t){const e=d;return t[e(477)]("aria-label")??t[e(641)]??t[e(562)]?.[e(514)]()??"<no visible label>"}(o);(async()=>{const t=n,e=l?await l:void 0;l=void 0,X(t(586),{tag:o[t(550)],label:i},o,e)})()},!0),addEventListener("keydown",e=>{const n=t;if(!W()&&"Enter"===e[n(592)]){const t=e[n(595)];if(t instanceof HTMLElement&&(t[n(550)]===n(484)||"TEXTAREA"===t[n(550)])){const e=t instanceof HTMLInputElement?t[n(614)]:void 0,o=t.id||void 0;X(n(599),{tag:t.tagName,name:e??o},t)}}},{capture:!0}),[t(623),t(551)].forEach(e=>{window[t(643)](e,nt)}),document[t(643)]("visibilitychange",nt),window[t(643)](t(664),function(t,e){let n;return(...o)=>{void 0!==n&&window.clearTimeout(n),n=window.setTimeout(()=>{n=void 0,t(...o)},e)}}(()=>{const e=t;W()||X("scroll",{scrollX:window[e(503)],scrollY:window[e(564)]},document.body)},250),{passive:!0}),window[t(561)]??={send(t,e){_()&&X(t,e,document.body)}})}function it(t,e){const n=at;try{if(void 0===e)return;localStorage.setItem(t,e?t===n(306)?"granted":n(304):"disabled")}catch{}}function at(t,e){t-=300;return dt()[t]}function rt(t={}){const e=at;if(localStorage[e(318)](e(307),t.clientId??""),localStorage.setItem("intent:data-ip",t.ip??""),localStorage[e(318)]("intent:data-base-url",t.baseUrl??e(316)),"number"==typeof t.sidMaxAgeSeconds&&localStorage[e(318)]("intent:data-sid-max-age",String(t[e(310)])),it("intent:consent",t[e(325)]),it(e(323),t[e(300)]),it("intent:debug",t[e(319)]),t.consent){if(!F(e(302))){j(typeof crypto!==e(315)&&typeof crypto[e(321)]===e(311)?crypto[e(321)]():Date[e(305)]()+"-"+Math[e(324)](),t.sidMaxAgeSeconds)}}ot()}function ct(){return F(at(302))}function st(){R()}function dt(){const t=["geo","3382YmHEJZ","intent_sid","66svYNRT","enabled","now","intent:consent","intent:data-client-id","775461tOrDLJ","2087764rtyAay","sidMaxAgeSeconds","function","493780EkdJGO","1757790FDaZZq","59YoeCky","undefined","https://intent.callimacus.ai","3527720sgeJLU","setItem","debug","isFinite","randomUUID","5656869oBNEHB","intent:geo","random","consent"];return(dt=function(){return t})()}function lt(){z()}function ut(t){const e=at;Number[e(320)](t)&&localStorage[e(318)]("intent:data-sid-max-age",String(t));const n=F(e(302));n&&j(n,t)}!function(){const t=at,e=dt();for(;;)try{if(421215===-parseInt(t(314))/1*(-parseInt(t(301))/2)+-parseInt(t(308))/3+parseInt(t(309))/4+parseInt(t(313))/5+-parseInt(t(303))/6*(-parseInt(t(312))/7)+-parseInt(t(317))/8+-parseInt(t(322))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();export{lt as clearIntentSessionId,st as ensureIntentSessionId,ct as getIntentSessionId,rt as initIntent,it as setFlag,ut as setIntentSessionMaxAge};
4
+ import t from"html2canvas-pro";import e from"js-cookie";async function n(){const t=i,e=[];let n=t(122);if("connection"in(o=navigator)&&void 0!==o[i(162)]){const n=navigator[t(162)];n?.[t(204)]&&e[t(198)](n[t(204)]),typeof n?.[t(179)]===t(229)&&e[t(198)]("~"+n.downlink+" Mbps"),typeof n?.[t(191)]===t(229)&&e[t(198)](n[t(191)]+t(113)),n?.[t(208)]&&e[t(198)](t(208))}else{const o=function(t=20){const e=i,n=performance[e(135)](e(169))[e(195)](t=>"navigation"===t.entryType),o=n?Math.max(0,n[e(227)]-n[e(127)]):void 0,a=performance[e(135)]("resource")[e(158)](t=>"resource"===t[e(231)]);let r=0,c=0;for(const n of a[e(206)](0,Math.max(0,t))){const t=n.encodedBodySize>0?n[e(214)]:n.transferSize>0?n[e(111)]:0,o=n[e(215)];t>0&&o>0&&Number[e(145)](o)&&(r+=t,c+=o)}const s=c>0?8*r/c:void 0;return{downlinkMbps:typeof s===e(229)?s/1e3:void 0,rttMs:o}}();typeof o[t(116)]===t(229)&&e[t(198)]("~"+o[t(116)][t(216)](1)+" Mbps"),typeof o.rttMs===t(229)&&e.push(t(209)+Math.round(o[t(224)])+" ms"),n=t(115)}var o;const a=performance[t(135)](t(169))[t(195)](e=>e[t(231)]===t(169));if(a){const n=Math[t(175)](0,a[t(227)]-a[t(127)]);!e[t(155)](t=>t.startsWith("TTFB"))&&e[t(198)](t(209)+Math[t(196)](n)+t(113))}return e[t(177)]?t(170)+e[t(152)](", ")+" ("+n+")":void 0}function o(){const t=i;if(!function(t){const e=i;return e(203)in t&&typeof t[e(203)]!==e(218)}(navigator))return;const e=navigator[t(203)],n=Array[t(128)](e[t(132)])?e[t(132)].map(e=>e[t(117)]+" "+e[t(140)])[t(152)](", "):void 0,o=e[t(136)]?""+e[t(136)]+(e[t(225)]?t(230):""):void 0;return[n&&t(180)+n,o&&t(144)+o].filter(Boolean).join(t(133))||void 0}function i(t,e){t-=111;return a()[t]}function a(){const t=["colorDepth","getBattery","some","°, γ ","Pointer/Touch: ","filter","Battery: ","reclined","422SUVtPU","connection","userAgent","deviceorientation","referrer","type","18102aCzAKd","abs","navigation","Network: ","cookieEnabled","13896510GnXGge","(pointer: coarse)","enabled","max","CookiesEnabled: ","length","height","downlink","UA brands: ","coarse","Referrer: ","upright","Tilt: ","removeEventListener","isSecureContext","-bit)","287512WCAhsP","function","charging","rtt","x (avail ","Language: ","intent:geo","find","round","padStart","push","Languages: ","maxTouchPoints","3296585laFuuc","innerWidth","userAgentData","effectiveType","520865FxyhFT","slice","Device geolocation: disabled","saveData","TTFB ~","Device geolocation: enabled","(pointer: fine)","beta","floor","encodedBodySize","duration","toFixed","width","undefined","Screen: ","yes","timeZone","12STDKng","Timezone: ","rttMs","mobile","language","responseStart","availHeight","number"," (mobile)","entryType","resolvedOptions","DateTimeFormat","transferSize","Viewport: "," ms","; DNT: ","inferred","downlinkMbps","brand","setTimeout","217FaKXXw","innerHeight","devicePixelRatio","browser API","2091760KhHucT","Local time: ","flat","hardwareConcurrency","requestStart","isArray","level",", display-mode standalone: ",", orientation ","brands"," | ","matches","getEntriesByType","platform","getItem","PWA: ","getTimezoneOffset","version","gamma","5758002WWYwut","fine","Platform: ","isFinite","n/a",", maxTouchPoints ","orientation","toString","languages"," (UTC","join"];return(a=function(){return t})()}async function r(t=400){const e=i;if("DeviceOrientationEvent"in window&&window[e(186)])return new Promise(n=>{const o=e;let a=!1;const r=t=>{const e=i,o=typeof t[e(212)]===e(229)?t[e(212)]:void 0,c=typeof t[e(141)]===e(229)?t.gamma:void 0;if(void 0===o||void 0===c)return;if(a)return;a=!0,window[e(185)](e(164),r);const s=function(t,e){const n=i,o=Math.abs(t),a=Math[n(168)](e);return n(o<15&&a<15?125:o>=60?183:160)}(o,c);n(e(184)+s+" (β "+Math.round(o)+e(156)+Math[e(196)](c)+"°)")};window[o(118)](()=>{const t=o;a||(a=!0,window[t(185)](t(164),r),n(void 0))},t),window.addEventListener(o(164),r,{passive:!0})})}async function c(){const t=i;var e;if("getBattery"in(e=navigator)&&"function"==typeof e[i(154)])try{const e=await navigator[t(154)](),n=Math.round(100*e[t(129)]),o=[(Number[t(145)](n)?n:0)+"%",e[t(190)]?t(190):"not charging"];return t(159)+o[t(152)](", ")}catch{}}async function s(){const t=i,e=(new(Intl[t(233)]))[t(232)]()[t(221)],a=function(t){const e=i,n=t<=0?"+":"-",o=Math[e(168)](t);return""+n+String(Math[e(213)](o/60))[e(197)](2,"0")+":"+String(o%60).padStart(2,"0")}((new Date)[t(139)]()),s=[];s[t(198)](t(193)+navigator[t(226)]),navigator[t(150)]?.[t(177)]&&s.push(t(199)+navigator[t(150)].join(", ")),s.push("User agent: "+navigator[t(163)]);const l=o();l&&s.push(l),s[t(198)](t(223)+e+t(151)+a+")"),s[t(198)](t(124)+(new Date)[t(149)]());const u=window[t(121)]||1;s[t(198)](t(219)+screen[t(217)]+"x"+screen[t(178)]+" @"+u+t(192)+screen.availWidth+"x"+screen[t(228)]+", "+screen[t(153)]+t(187));const d=screen[t(148)]&&t(166)in screen[t(148)]?screen[t(148)][t(166)]:void 0;s[t(198)](t(112)+window[t(202)]+"x"+window[t(120)]+(d?t(131)+d:"")),s.push("CPU: "+navigator[t(126)]+" cores");const f=await n();f&&s[t(198)](f),s[t(198)](function(){const t=i,e="function"==typeof matchMedia&&matchMedia(t(173))[t(134)],n=typeof matchMedia===t(189)&&matchMedia(t(211))[t(134)],o=e?t(181):n?t(143):"unknown",a=navigator[t(200)];return t(157)+o+t(147)+a}());const m=await c();m&&s.push(m),s[t(198)](t(176)+(navigator[t(171)]?t(220):"no")+t(114)+(navigator.doNotTrack??t(146))),s[t(198)]("Online: "+(navigator.onLine?"yes":"no")),document[t(165)]&&s[t(198)](t(182)+document[t(165)]),s[t(198)](function(){const t=i,e=typeof matchMedia===t(189)&&matchMedia("(display-mode: standalone)")[t(134)],n=Boolean(navigator.serviceWorker?.controller);return t(138)+(n?"SW-controlled":"no SW")+t(130)+(e?t(220):"no")}());const p=await r();p&&s.push(p);const g=localStorage[t(137)](t(194))===t(174);return s[t(198)](t(g?210:207)),s[t(152)](t(133))}!function(){const t=i,e=a();for(;;)try{if(774717===-parseInt(t(205))/1+-parseInt(t(161))/2*(-parseInt(t(167))/3)+-parseInt(t(123))/4+parseInt(t(201))/5*(-parseInt(t(222))/6)+-parseInt(t(119))/7*(-parseInt(t(188))/8)+-parseInt(t(142))/9+parseInt(t(172))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const l=O;!function(){const t=O,e=C();for(;;)try{if(393693===parseInt(t(466))/1+parseInt(t(418))/2*(parseInt(t(457))/3)+-parseInt(t(531))/4+-parseInt(t(422))/5+parseInt(t(429))/6+-parseInt(t(442))/7+-parseInt(t(559))/8)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();let u,d="",f=0;let m;const p=l(473),g=l(427),w=l(405);let h=!1,y=!1,v=!1,b=!1,T=!1,S=!1;const I=l(412),x=l(487),E=l(588),M="https://intent.callimacus.ai",L=l(461),A=l(479),k=[l(416),l(543),"a",l(477),l(464),l(576),l(480),l(557)][l(561)](","),D=l(550),N=l(449),H=new Set([l(503),l(526),"additional-name",l(453),"nickname","username",l(563),l(595),l(441),"organization-title",l(554),l(495),l(568),l(414),l(433),"address-level2",l(555),l(411),l(465),l(509),l(485),"cc-name",l(456),l(419),l(502),l(398),l(589),l(410),"cc-exp-year","cc-csc",l(401),"bday",l(560),l(527),l(447),l(458),l(516)]);function P(...t){const e=l;try{typeof localStorage!==e(445)&&localStorage[e(399)](w)===e(468)&&console[e(571)](...t)}catch{}}function C(){const t=["cc-family-name","name","defineProperty","keydown","setAttribute","key","set","country-name","speed","get","latitude","cc-","Phone","tagName","webauthn","cloneNode","isSecureContext","referrer","includes","forEach","addEventListener","textContent","min","page-focus","given-name","bday-month","body","startsWith","hasFocus","6524abiTiU","hasAttribute","ignore","pointerdown","input-submit","filter","absolute","permissions","visibilitychange","Address","password","fixed","a[href]","toLowerCase","toFixed","https:","page-blur","from","toISOString","data-intent-redact","bday","pageview","Enter","street-address","address-level3","blur","[onclick]","x-intent-sid","10490984AYWUlT","bday-day","join","deviceGeoSent","email","load","geolocation","getBoundingClientRect","title","address-line2","some","scroll","log","message","right","randomUUID","target",'[role="button"]',"getAttribute","bottom","device","disabled","innerHeight","Lax","Credit card","[Timing] serialize: ","trim","protocol","onLine","intent:data-base-url","cc-exp","<no visible label>","altitudeAccuracy","number","intent_sid","Redacted","tel","lon","cc-number","getItem","role","cc-type","image/jpeg","searchbox","POSITION_UNAVAILABLE","intent:debug","outerHTML",'=""]',"remove","Birthday","cc-exp-month","address-level4","intent:data-client-id","additional-name","address-line3","width","button","omit","7434DwwIjE","cc-additional-name","timestamp","TEXTAREA","607410CToYRw","organization-title","click","heading","altitude","intent:geo","split","4123392CohGCn","autocomplete","img","POST","address-level1","Email","data-html2canvas-ignore","href","querySelectorAll","hostname","mask","bbox","organization","1297555cJFUDj","search","innerWidth","undefined","getComputedStyle","bday-year","Organization","data-intent-redact-label","[Timing] html2canvas-pro: ","INPUT","height","family-name","PERMISSION_DENIED","html","cc-given-name","576AzpONj","sex","address-level2","length","intent:data-sid-max-age","max","type",'input[type="button"]',"country","612648qKOxaV","clearTimeout","enabled","[Timing] jpeg-encoding: ","left","entries","/p.gif","intent:consent","visibilityState","location","storage",'input[type="submit"]',"input, textarea","__intent__sdk__initialized__",'[role="link"]',"scrollY","UNKNOWN","push","Password","postal-code","has","intent:data-ip","now","value","hidden","Sex","code","closest","stringify","address-line1","isFinite","intent","query","top","setTimeout","scrollX"];return(C=function(){return t})()}function B(t){return"<"+function(t){const e=l,n=(t[e(577)]?.(N)??"")[e(585)]();if(n)return n;const o=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?(t[e(430)]||"").toLowerCase()[e(585)]()[e(428)](/\s+/)[e(536)](Boolean):[];return t instanceof HTMLInputElement&&t.type===e(541)?e(484):o[e(569)](t=>t[e(529)](e(513)))?e(583):o[e(569)](t=>[e(503),e(526),e(453),e(413),"cc-name","cc-given-name",e(502)][e(520)](t))?"Name":o[e(520)](e(563))?e(434):o.includes("tel")?e(514):o.some(t=>t.startsWith(e(551)))?e(409):o[e(520)](e(458))?e(491):o.some(t=>[e(554),"address-line1",e(568),"address-line3",e(433),e(459),e(555),e(411),"postal-code",e(465),e(509)][e(520)](t))?e(540):o[e(520)](e(441))||o[e(520)](e(423))?e(448):"mask"===t[e(577)]?.(D)?.[e(544)]()?e(594):"Sensitive"}(t)+">"}function O(t,e){t-=398;return C()[t]}function U(t){const e=l;return t[e(532)](e(435))||t[e(577)](D)?.toLowerCase()===e(533)}function W(t){return!U(t)&&(!!function(t){const e=l,n=t[e(577)](D);return""===n||n?.[e(544)]()===e(439)}(t)||!!function(t){const e=l;if(t instanceof HTMLInputElement){if("password"===t.type)return!0;if(t[e(463)]===e(443))return!1;const n=t.getAttribute(e(400));if(n&&n[e(544)]()===e(403))return!1;if((t[e(430)]||"")[e(544)]()[e(585)]()[e(428)](/\s+/).filter(Boolean)[e(569)](t=>H.has(t)))return!0}if(t instanceof HTMLTextAreaElement&&(t[e(430)]||"").toLowerCase().trim().split(/\s+/).filter(Boolean).some(t=>H[e(486)](t)))return!0;return!1}(t))}const z=()=>"granted"===localStorage[l(399)](p);function F(t){return e[l(511)](t)}function j(t,n){const o=l,i=localStorage.getItem(L),a=null===i?void 0:Number(i),r=Number[o(496)](n)?Number(n):typeof a===o(592)&&Number[o(496)](a)?a:2592e3,c=window[o(475)][o(586)]===o(546);e[o(508)](o(593),t,{expires:r/86400,path:"/",sameSite:o(582),...c&&{secure:!0}})}function _(){const t=l;e[t(408)](t(593),{path:"/"})}function R(){const t=l,e=F(t(593));if(!z())return e&&_(),void(d="");e?d=e:(d=crypto[t(574)](),j(d))}function Y(){return R(),z()&&Boolean(d)&&function(){const t=l;return Boolean(localStorage[t(399)](I)?.[t(585)]()[t(460)])}()}function X(){return!Y()||v}async function G(e){return m&&await m,m=(async()=>{const n=O;try{const o=performance[n(488)](),i=performance.now(),a=function(t){const e=l,n=t[e(517)](!1);return n instanceof HTMLInputElement&&t instanceof HTMLInputElement?(Array[e(548)](t.attributes)[e(521)](({name:t,value:o})=>{n[e(506)](t,o)}),n.value=W(t)?B(t):t.value,t[e(580)]&&n[e(506)](e(580),""),n[e(406)]):n instanceof HTMLTextAreaElement&&t instanceof HTMLTextAreaElement?(Array.from(t.attributes)[e(521)](({name:t,value:o})=>{n[e(506)](t,o)}),n[e(489)]=W(t)?B(t):t.value,t.disabled&&n[e(506)](e(580),""),n.outerHTML):t[e(406)]}(e),r=performance[n(488)]()-i;P(n(584)+r[n(545)](2)+"ms");const c=e.getBoundingClientRect(),s=performance.now(),u={left:window.scrollX,top:window[n(481)],right:window.scrollX+window[n(444)],bottom:window[n(481)]+window[n(581)]},d=await t(document[n(528)],{useCORS:!0,x:window[n(501)],y:window[n(481)],width:window[n(444)],height:window[n(581)],scale:.6,logging:!1,onclone(t,e){const o=n,i=t.querySelectorAll(o(478));for(const t of i)if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){if(t[o(532)](o(435))||t[o(577)](D)?.[o(544)]()===o(533))continue;let e=!1;const n=t.getAttribute(D);if((""===n||"mask"===n?.[o(544)]())&&(e=!0),t[o(463)]===o(541)&&(e=!0),!e){const n=(t[o(577)](o(430))||"")[o(544)]().trim()[o(428)](/\s+/).filter(Boolean);if(t[o(463)]===o(443)||t.getAttribute("role")?.[o(544)]()===o(403))continue;n[o(569)](t=>H.has(t))&&(e=!0)}e&&(t.value=B(t))}},ignoreElements(t){const e=n;if(!(t instanceof Element))return!1;if(U(t))return!0;const o=t[e(566)](),i={left:o[e(470)]+window[e(501)],top:o.top+window.scrollY,right:o[e(573)]+window[e(501)],bottom:o[e(578)]+window.scrollY},a=100;if(i[e(573)]<u.left-a||i[e(470)]>u[e(573)]+a||i[e(578)]<u.top-a||i[e(499)]>u[e(578)]+a){const n=window[e(446)](t),{position:o}=n;if(o===e(542)||o===e(537)){const t=500;return i[e(573)]<u[e(470)]-t||i[e(470)]>u[e(573)]+t||i[e(578)]<u[e(499)]-t||i.top>u[e(578)]+t}return!0}return!1}}),f=performance[n(488)]()-s;P(n(450)+f[n(545)](2)+"ms");const m=performance[n(488)](),p=d.toDataURL(n(402),.8),g=performance[n(488)]()-m;P(n(469)+g[n(545)](2)+"ms");const w=performance.now();return P("[Timing] capture-total: "+(w-o)[n(545)](2)+"ms"),{html:a,bbox:{x:c.x,y:c.y,w:c[n(415)],h:c[n(452)]},img:p}}finally{m=void 0}})(),m}function K(){const t=l,e=localStorage[t(399)](I),n={"Content-Type":"application/json"};return e&&(n["x-sl-access-token"]=e),d&&(n[t(558)]=d),n}async function q(t){const e=l,n=(localStorage.getItem(E)??M)+"/events",o=localStorage[e(399)](I)??void 0,i=JSON[e(494)]({...t,clientId:o});try{if((await fetch(n,{method:e(432),headers:K(),body:i,keepalive:!0,credentials:e(417)})).ok)return}catch{}try{await async function(t){const e=l,n=(localStorage[e(399)](E)??M)+e(472);if(!(await fetch(n,{method:"POST",headers:K(),body:JSON.stringify(t),keepalive:!0,credentials:e(417),cache:"no-store"})).ok)throw new Error("pixel body fallback failed")}(t)}catch{}}async function J(t,e,n,o){const i=l;if(!Y())return;const a={...e,localTime:(new Date)[i(549)]()};(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&(a.value=W(n)?B(n):n[i(489)]);let r="",c={x:0,y:0,w:0,h:0},s="";const u=!(t===i(570)||"page-blur"===t||t===i(525)),d=Date[i(488)](),m=d-f>=0;let p=o;const g=t===i(424)||t===i(535)||t===i(552);u&&(g&&!p||!p&&m)&&(p=await G(n),f=d),p&&(r=p[i(455)],c=p[i(440)],s=p[i(431)]);const w=t===i(547)||t===i(525)||"pageview"===t,h={ts:Date[i(488)](),event:t,props:a,html:w?"":r,bbox:c,img:s};await q(h)}function Z(){const t=l;return localStorage[t(399)](g)===t(468)}async function V(t={}){const e=l;if(!Y())return;const n="number"==typeof t.lat&&typeof t[e(596)]===e(592);if(n&&y)return;if(!n&&h)return;const o=localStorage[e(399)](x),i={context:await s()};o&&(i.ip=o);for(const[n,o]of Object[e(471)](t))i[n]=o;await J("context",i,document[e(528)],{html:"",bbox:{x:0,y:0,w:0,h:0},img:""}),n?y=!0:h=!0}async function Q(){const t=l,e={canSend:Y(),geoEnabled:Z(),deviceGeoSent:y};if(!e.canSend||!e.geoEnabled||e[t(562)])return;if(location[t(586)],!("geolocation"in navigator))return;if(T)return;T=!0,v=!0;const n={enableHighAccuracy:!1,maximumAge:3e5,timeout:2e4};Date[t(488)]();try{await(navigator[t(538)]?.[t(498)]({name:t(565)}))}catch(t){}await new Promise(t=>{let e=!1;const o=async(n,o,i)=>{const a=O;e||(e=!0,Date[a(488)](),Number[a(496)](n)&&Number[a(496)](o)&&await V({lat:n,lon:o,source:a(579)}),T=!1,v=!1,S=!0,t())};navigator.geolocation.getCurrentPosition(t=>{const e=O,n=t.coords;o(n[e(512)],n.longitude,(n.accuracy,typeof n[e(426)]===e(592)&&n[e(426)],typeof n.altitudeAccuracy===e(592)&&n[e(591)],"number"==typeof n[e(425)]&&n[e(425)],typeof n[e(510)]===e(592)&&n[e(510)],t[e(420)],document[e(474)],document[e(530)]()))},t=>{const e=O,n=t?.[e(492)];1===n?e(454):2===n?e(404):3===n||e(482),t?.[e(572)],navigator[e(587)],document.hasFocus(),window[e(518)],location[e(586)],location[e(438)],o(void 0,void 0)},n)})}function $(){const t=l;if(b||!Z()||y)return;b=!0;const e=()=>{const t=O;window.removeEventListener("pointerdown",e,!0),window.removeEventListener(t(505),e,!0),Q()};window[t(522)]("pointerdown",e,!0),window.addEventListener(t(505),e,!0)}R();let tt=!document[l(490)]&&document[l(530)](),et=document[l(530)]();function nt(){const t=l;if(X())return;const e=!document[t(490)]&&document[t(530)]();e&&(et=!0),et||e?e!==tt&&(tt=e,J(t(e?525:547),{},document.body)):tt=e}function ot(){const t=l;(function(){const t=l,e=globalThis;return!e[A]&&(Object[t(504)](e,A,{value:!0,configurable:!1,enumerable:!1,writable:!1}),!0)})()&&(window[t(522)](t(564),()=>{const e=t;Y()&&(V(),(window[e(518)]||"localhost"===location[e(438)])&&(Z()&&$(),window[e(522)]("focus",()=>{!y&&Z()&&!T&&S&&Q()}),document[e(522)](e(539),()=>{!document.hidden&&!y&&Z()&&!T&&S&&Q()})))}),window[t(522)](t(476),e=>{const n=t;e[n(507)]===p&&("granted"===localStorage.getItem(p)?(h=!1,V(),Z()&&$()):(h=!1,y=!1)),e[n(507)]===g&&(Z()?$():y=!1)}),window.addEventListener(t(564),()=>{const e=t;Y()&&J(e(552),{url:window[e(475)][e(436)],title:document[e(567)],ref:document[e(519)]},document[e(528)])}),addEventListener(t(534),function(t,e){let n=0;return(...o)=>{const i=Date[O(488)]();i-n>=e&&(n=i,t(...o))}}(e=>{const n=t;if(X())return;const o=e[n(575)]instanceof Element?e[n(575)][n(493)](k):null;o instanceof HTMLElement&&(u=G(o))},50),{capture:!0,passive:!0}),addEventListener(t(424),async e=>{const n=t;if(X())return;if(!(e[n(575)]instanceof Element))return;const o=e[n(575)][n(493)](k);if(!(o instanceof HTMLElement))return;const i=function(t){const e=l;return t[e(577)]("aria-label")??t[e(567)]??t[e(523)]?.[e(585)]()??e(590)}(o);(async()=>{const t=n,e=u?await u:void 0;u=void 0,J(t(424),{tag:o[t(515)],label:i},o,e)})()},!0),addEventListener(t(505),e=>{const n=t;if(!X()&&e[n(507)]===n(553)){const t=e[n(575)];if(t instanceof HTMLElement&&(t.tagName===n(451)||t.tagName===n(421))){const e=t instanceof HTMLInputElement?t[n(503)]:void 0,o=t.id||void 0;J("input-submit",{tag:t[n(515)],name:e??o},t)}}},{capture:!0}),["focus",t(556)].forEach(e=>{window[t(522)](e,nt)}),document.addEventListener(t(539),nt),window[t(522)](t(570),function(t,e){let n;return(...o)=>{const i=O;void 0!==n&&window[i(467)](n),n=window[i(500)](()=>{n=void 0,t(...o)},e)}}(()=>{const e=t;X()||J("scroll",{scrollX:window[e(501)],scrollY:window[e(481)]},document[e(528)])},250),{passive:!0}),window[t(497)]??={send(e,n){const o=t;Y()&&J(e,n,document[o(528)])}})}function it(t,e){t-=235;return at()[t]}function at(){const t=["intent_sid","https://intent.callimacus.ai","disabled","undefined","enabled","626hirskl","sidMaxAgeSeconds","intent:debug","baseUrl","setItem","intent:data-ip","3152lzNckL","5938158GncBbi","8HPZbfP","debug","now","number","249zYoDWT","randomUUID","clientId","intent:consent","consent","27248SkfBao","9988812aPDYEu","intent:data-client-id","2257955DODUiJ","8215634laExZn","granted","3264920JLYLyH","intent:data-sid-max-age","function","intent:geo","geo","intent:data-base-url","random","11FfZWZd"];return(at=function(){return t})()}function rt(t,e){const n=it;try{if(void 0===e)return;localStorage[n(243)](t,e?t===n(254)?n(261):n(238):n(236))}catch{}}function ct(t){rt(it(254),t)}function st(t){rt("intent:geo",t)}function lt(t){rt(it(241),t)}function ut(t={}){const e=it;if(localStorage.setItem(e(258),t[e(253)]??""),localStorage.setItem(e(244),t.ip??""),localStorage[e(243)](e(267),t[e(242)]??e(235)),typeof t[e(240)]===e(250)&&localStorage[e(243)](e(263),String(t[e(240)])),rt("intent:consent",t[e(255)]),rt(e(265),t[e(266)]),rt(e(241),t[e(248)]),t[e(255)]){if(!F("intent_sid")){j(typeof crypto!==e(237)&&typeof crypto[e(252)]===e(264)?crypto[e(252)]():Date[e(249)]()+"-"+Math[e(268)](),t[e(240)])}}ot()}function dt(){return F(it(270))}function ft(){R()}function mt(){_()}function pt(t){const e=it;Number.isFinite(t)&&localStorage.setItem(e(263),String(t));const n=F(e(270));n&&j(n,t)}!function(){const t=it,e=at();for(;;)try{if(751172===parseInt(t(239))/1*(parseInt(t(245))/2)+-parseInt(t(251))/3*(-parseInt(t(256))/4)+parseInt(t(259))/5+-parseInt(t(246))/6+parseInt(t(260))/7+parseInt(t(247))/8*(-parseInt(t(257))/9)+-parseInt(t(262))/10*(parseInt(t(269))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();export{mt as clearIntentSessionId,ft as ensureIntentSessionId,dt as getIntentSessionId,ut as initIntent,ct as setConsent,lt as setDebug,rt as setFlag,st as setGeo,pt as setIntentSessionMaxAge};