@solomei-ai/intent 1.2.0 → 1.4.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 +71 -12
- package/dist/esm/index.js +1 -1
- package/dist/intent.umd.min.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,26 +1,85 @@
|
|
|
1
|
-
|
|
1
|
+
# Intent Integration
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The **Intent** tracker collects consented client context and sends events to **Callimacus**.
|
|
4
|
+
It can be easily integrated into modern applications (React, Vite, Next.js, etc.) via npm or directly via a script tag.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 📦 Installation
|
|
9
|
+
|
|
10
|
+
### Using npm (recommended)
|
|
11
|
+
|
|
12
|
+
Install the package from npm:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install @solomei-ai/intent
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## ⚙️ Usage
|
|
21
|
+
|
|
22
|
+
Initialize **Intent** in your app entry point:
|
|
4
23
|
|
|
5
|
-
### Usage
|
|
6
24
|
```ts
|
|
7
25
|
// app entry
|
|
8
|
-
import {initIntent} from '@solomei-ai/
|
|
26
|
+
import { initIntent } from '@solomei-ai/intent';
|
|
9
27
|
|
|
10
28
|
initIntent({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
geo: true, // can be set to true later
|
|
29
|
+
clientId: 'cal-pk-...', // your Callimacus Client ID
|
|
30
|
+
consent: true, // can be toggled later
|
|
31
|
+
geo: true, // can be toggled later
|
|
15
32
|
});
|
|
16
33
|
```
|
|
17
34
|
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 🌐 CDN Usage
|
|
38
|
+
|
|
39
|
+
If you prefer not to use npm, include the package via a `<script>` tag:
|
|
40
|
+
|
|
41
|
+
### Option 1: jsDelivr
|
|
42
|
+
|
|
43
|
+
```html
|
|
44
|
+
<script src="https://cdn.jsdelivr.net/npm/@solomei-ai/intent/dist/intent.umd.min.js"></script>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Option 2: unpkg
|
|
48
|
+
|
|
49
|
+
```html
|
|
50
|
+
<script src="https://unpkg.com/@solomei-ai/intent/dist/intent.umd.min.js"></script>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Once loaded, access the module from the global `window.Intent` namespace:
|
|
54
|
+
|
|
55
|
+
```html
|
|
56
|
+
<script>
|
|
57
|
+
const { initIntent } = window.Intent;
|
|
58
|
+
|
|
59
|
+
initIntent({
|
|
60
|
+
clientId: 'cal-pk-...',
|
|
61
|
+
consent: true,
|
|
62
|
+
geo: false,
|
|
63
|
+
});
|
|
64
|
+
</script>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## 📘 More Information
|
|
70
|
+
|
|
71
|
+
* npm: [@solomei-ai/intent](https://www.npmjs.com/package/@solomei-ai/intent)
|
|
72
|
+
* jsDelivr: [https://www.jsdelivr.com/package/npm/@solomei-ai/intent](https://www.jsdelivr.com/package/npm/@solomei-ai/intent)
|
|
73
|
+
* unpkg: [https://unpkg.com/@solomei-ai/intent](https://unpkg.com/@solomei-ai/intent)
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
18
77
|
|
|
19
|
-
|
|
78
|
+
## Managing consent & geolocation flags
|
|
20
79
|
You can pass flags to `initIntent` or toggle them at runtime with setFlag:
|
|
21
80
|
|
|
22
81
|
```ts
|
|
23
|
-
import {setFlag} from '@solomei-ai/
|
|
82
|
+
import {setFlag} from '@solomei-ai/intent';
|
|
24
83
|
|
|
25
84
|
// Grant or revoke consent
|
|
26
85
|
setFlag('intent:consent', true); // granted
|
|
@@ -34,7 +93,7 @@ setFlag('intent:geo', false); // 'disabled
|
|
|
34
93
|
- If consent is revoked, the tracker clears `intent_sid` and stops sending events.
|
|
35
94
|
---
|
|
36
95
|
|
|
37
|
-
|
|
96
|
+
## Using `intent_sid`
|
|
38
97
|
|
|
39
98
|
Use these utilities to read or manage the session cookie from your app:
|
|
40
99
|
```ts
|
|
@@ -42,7 +101,7 @@ import {
|
|
|
42
101
|
getIntentSessionId,
|
|
43
102
|
clearIntentSessionId,
|
|
44
103
|
ensureIntentSessionId,
|
|
45
|
-
} from '@solomei-ai/
|
|
104
|
+
} from '@solomei-ai/intent';
|
|
46
105
|
|
|
47
106
|
const sid = getIntentSessionId(); // string | undefined, can be sent to backend
|
|
48
107
|
clearIntentSessionId(); // deletes cookie
|
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";async function e(){const t=n,e=[];if(function(t){const e=n;return"connection"in t&&typeof t.connection!==e(537)}(navigator)){const n=navigator[t(499)];n?.effectiveType&&e[t(572)](n.effectiveType),"number"==typeof n?.[t(569)]&&e.push(n[t(569)]+t(463)),"number"==typeof n?.[t(545)]&&e[t(572)](n[t(545)]+" ms"),n?.[t(523)]&&e[t(572)](t(523))}const o=await async function(t,e=3e3,o=8,a=150){const i=n;if(!(i(574)in window)||!(i(513)in window))return;const r=performance[i(530)]();let c,s=0;await Promise[i(482)](Array[i(519)]({length:o},async()=>{const n=i;for(;performance[n(530)]()-r<e+a;){const o=new AbortController,i=(t[n(571)]("?")?"&":"?")+n(491)+Math[n(557)]().toString(36)[n(558)](2);try{const d=await fetch(t+i,{cache:n(554),signal:o.signal,mode:n(474)}),u=d[n(538)]?.getReader();if(!u)break;for(;;){const t=performance[n(530)]();if(t-r>=e+a){o[n(582)]();break}const{done:i,value:d}=await u.read();if(i)break;c??=t,t-(c??t)>=a&&(s+=d.byteLength)}}catch{}}}));const d=(c??r)+a,u=Math.max(1,performance[i(530)]()-d),l=8*s/(u/1e3)/1e6;return Number[i(492)](l)&&l>0?l:void 0}(t(500),3e3,8,150),a=performance[t(556)](t(498)).find(e=>e.entryType===t(498));let i;if(a){const e=Math[t(562)](0,a[t(564)]-a[t(535)]);i=t(503)+Math[t(479)](e)+" ms"}const r=[];if(typeof o===t(486)&&r[t(572)]("~"+o[t(471)](1)+" Mbps"),i&&r.push(i),e[t(524)]&&r[t(572)](t(547)+e.join(", ")),r[t(524)])return t(465)+r[t(485)](", ")+" (active test)"}function n(t,e){const o=r();return(n=function(t,e){return o[t-=458]})(t,e)}function o(){const t=n;if(!function(t){const e=n;return e(551)in t&&typeof t[e(551)]!==e(537)}(navigator))return;const e=navigator[t(551)],o=Array[t(501)](e.brands)?e[t(516)].map(e=>e[t(563)]+" "+e[t(532)])[t(485)](", "):void 0,a=e.platform?e[t(469)]+(e[t(561)]?" (mobile)":""):void 0;return[o&&t(481)+o,a&&t(497)+a].filter(Boolean)[t(485)](t(470))||void 0}async function a(t=400){const e=n;if(e(517)in window&&window[e(559)])return new Promise(o=>{const a=e;let i=!1;const r=t=>{const e=n,a=typeof t.beta===e(486)?t[e(460)]:void 0,c=typeof t[e(472)]===e(486)?t[e(472)]:void 0;if(void 0===a||void 0===c)return;if(i)return;i=!0,window[e(548)](e(549),r);const s=function(t,e){const o=n,a=Math[o(541)](t),i=Math[o(541)](e);return a<15&&i<15?o(567):a>=60?"upright":o(526)}(a,c);o(e(508)+s+e(542)+Math.round(a)+e(566)+Math.round(c)+"°)")};window[a(462)](()=>{const t=a;i||(i=!0,window[t(548)](t(549),r),o(void 0))},t),window[a(534)]("deviceorientation",r,{passive:!0})})}async function i(){const t=n;if(function(t){const e=n;return e(550)in t&&"function"==typeof t[e(550)]}(navigator))try{const e=await navigator[t(550)](),n=Math[t(479)](100*e.level),o=[(Number[t(492)](n)?n:0)+"%",e[t(459)]?t(459):t(520)];return t(490)+o[t(485)](", ")}catch{return}}function r(){const t=["Device geolocation: enabled","rtt","221080recpej","hint: ","removeEventListener","deviceorientation","getBattery","userAgentData","languages","Languages: ","no-store","getItem","getEntriesByType","random","slice","isSecureContext","DateTimeFormat","mobile","max","brand","responseStart","Device geolocation: disabled","°, γ ","flat","14315KuKyAm","downlink","1892149YQaIYM","includes","push","floor","fetch","n/a","referrer","padStart","type","21232849toWFka","serviceWorker","availWidth","abort","innerWidth","charging","beta",", maxTouchPoints ","setTimeout"," Mbps","Local time: ","Network: ","-bit)","enabled"," (UTC","platform"," | ","toFixed","gamma","x (avail ","cors","resolvedOptions","3458024zDwMuQ","207HGCUxU","(display-mode: standalone)","round","(pointer: fine)","UA brands: ","all","6JAAhok","yes","join","number","2zlqKPu","getTimezoneOffset","onLine","Battery: ","cb=","isFinite","Timezone: ","no SW","function","devicePixelRatio","Platform: ","navigation","connection","/speedtest.bin","isArray","controller","TTFB ~","colorDepth","doNotTrack","Online: ","734530lOvLuK","Tilt: ","140ZJXStO","orientation","12ZruAPz","Pointer/Touch: ","ReadableStream","Viewport: ","coarse","brands","DeviceOrientationEvent","language","from","not charging","height","availHeight","saveData","length","(pointer: coarse)","reclined","PWA: "," cores","unknown","now","maxTouchPoints","version","fine","addEventListener","requestStart","CPU: ","undefined","body","matches","cookieEnabled","abs"," (β ","1385481MfpndM"];return(r=function(){return t})()}async function c(){const t=n,r=(new(Intl[t(560)]))[t(475)]().timeZone,c=function(t){const e=n,o=t<=0?"+":"-",a=Math.abs(t);return""+o+String(Math[e(573)](a/60))[e(577)](2,"0")+":"+String(a%60).padStart(2,"0")}((new Date)[t(488)]()),s=[];s.push("Language: "+navigator[t(518)]),navigator[t(552)]?.[t(524)]&&s[t(572)](t(553)+navigator[t(552)][t(485)](", ")),s.push("User agent: "+navigator.userAgent);const d=o();d&&s.push(d),s[t(572)](t(493)+r+t(468)+c+")"),s[t(572)](t(464)+(new Date).toString());const u=window[t(496)]||1;s[t(572)]("Screen: "+screen.width+"x"+screen[t(521)]+" @"+u+t(473)+screen[t(581)]+"x"+screen[t(522)]+", "+screen[t(504)]+t(466));const l=screen[t(510)]&&t(578)in screen.orientation?screen[t(510)].type:void 0;s.push(t(514)+window[t(458)]+"x"+window.innerHeight+(l?", orientation "+l:"")),s[t(572)](t(536)+navigator.hardwareConcurrency+t(528));const f=await e();f&&s[t(572)](f),s.push(function(){const t=n,e=typeof matchMedia===t(495)&&matchMedia(t(525))[t(539)],o=typeof matchMedia===t(495)&&matchMedia(t(480))[t(539)],a=t(e?515:o?533:529),i=typeof navigator[t(531)]===t(486)?navigator.maxTouchPoints:0;return t(512)+a+t(461)+i}());const m=await i();m&&s[t(572)](m),s[t(572)]("CookiesEnabled: "+(navigator[t(540)]?t(484):"no")+"; DNT: "+(navigator[t(505)]??t(575))),s[t(572)](t(506)+(navigator[t(489)]?t(484):"no")),document[t(576)]&&s[t(572)]("Referrer: "+document[t(576)]),s[t(572)](function(){const t=n,e=typeof matchMedia===t(495)&&matchMedia(t(478))[t(539)],o=Boolean(navigator[t(580)]?.[t(502)]);return t(527)+(o?"SW-controlled":t(494))+", display-mode standalone: "+(e?t(484):"no")}());const p=await a();p&&s[t(572)](p);const h=typeof localStorage!==t(537)&&localStorage[t(555)]("intent:geo")===t(467);return s[t(572)](t(h?544:565)),s[t(485)](" | ")}!function(){const t=n,e=r();for(;;)try{if(439621===-parseInt(t(507))/1+-parseInt(t(487))/2*(parseInt(t(543))/3)+parseInt(t(509))/4*(-parseInt(t(568))/5)+-parseInt(t(483))/6*(parseInt(t(570))/7)+-parseInt(t(476))/8+parseInt(t(477))/9*(parseInt(t(546))/10)+parseInt(t(579))/11*(parseInt(t(511))/12))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const s=f;!function(){const t=f,e=Q();for(;;)try{if(384738===-parseInt(t(268))/1+parseInt(t(348))/2+-parseInt(t(208))/3+parseInt(t(287))/4+-parseInt(t(357))/5+parseInt(t(239))/6*(parseInt(t(305))/7)+parseInt(t(219))/8*(parseInt(t(337))/9))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();let d,u="",l=0;function f(t,e){const n=Q();return(f=function(t,e){return n[t-=205]})(t,e)}const m=s(238),p=s(242);let h=!1,g=!1,w=!1,y=!1,v=!1,b=!1;const M=s(387),I=s(396),S=s(313),x=s(250),E=[s(304),"a[href]","a",s(419),'input[type="button"]',s(366),'[role="link"]',s(235)].join(","),T=s(410),L=s(364),A=new Set(["name",s(280),s(276),s(253),"nickname",s(273),s(340),s(391),s(328),s(308),s(282),s(302),s(211),s(412),s(325),s(374),s(244),s(252),s(298),s(375),"postal-code",s(339),"cc-given-name","cc-additional-name",s(207),"cc-number",s(277),s(418),s(221),s(315),s(265),"bday",s(212),s(372),s(335),"sex",s(292)]);function k(t){return"<"+D(t)+">"}function D(t){const e=s,n=(t[e(330)]?.(L)??"").trim();if(n)return n;const o=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?(t.autocomplete||"")[e(358)]().trim()[e(248)](/\s+/)[e(209)](Boolean):[];return t instanceof HTMLInputElement&&t[e(279)]===e(413)?"Password":o[e(349)](t=>t[e(294)](e(289)))?e(365):o.some(t=>["name",e(280),e(253),e(276),e(339),"cc-given-name",e(207)][e(405)](t))?e(234):o[e(405)](e(340))?e(361):o[e(405)]("tel")?e(341):o[e(349)](t=>t[e(294)](e(420)))?e(342):o.includes(e(321))?"Sex":o[e(349)](t=>[e(282),e(302),e(211),e(412),"address-level1",e(374),"address-level3",e(252),"postal-code","country",e(375)][e(405)](t))?e(307):o[e(405)](e(328))||o[e(405)](e(308))?"Organization":t[e(330)]?.(T)?.[e(358)]()===e(263)?e(296):e(284)}function H(t){const e=s;return t[e(264)]("data-html2canvas-ignore")||t.getAttribute(T)?.[e(358)]()===e(281)}function P(t){const e=s,n=t[e(330)](T);return""===n||"mask"===n?.[e(358)]()}function N(t){const e=s;if(t instanceof HTMLInputElement){if("password"===t[e(279)])return!0;if(t[e(279)]===e(223))return!1;const n=t[e(330)](e(345));if(n&&"searchbox"===n[e(358)]())return!1;if((t.autocomplete||"")[e(358)]()[e(309)]()[e(248)](/\s+/).filter(Boolean)[e(349)](t=>A[e(257)](t)))return!0}if(t instanceof HTMLTextAreaElement){if((t.autocomplete||"")[e(358)]()[e(309)]()[e(248)](/\s+/)[e(209)](Boolean)[e(349)](t=>A.has(t)))return!0}return!1}function U(t){return!!P(t)||!!N(t)}function C(){const t=s,e=[],n=t=>{const e=f,n=t[e(310)]();if(n.width<=0||n[e(270)]<=0)return;const o=Math[e(395)](0,n.left),a=Math[e(395)](0,n.top),i=Math[e(395)](0,Math[e(220)](n[e(237)],window[e(251)])-o),r=Math[e(395)](0,Math[e(220)](n[e(286)],window[e(324)])-a);return i<=0||r<=0?void 0:{x:o,y:a,w:i,h:r}};document[t(312)]("["+T+t(347)+T+t(338))[t(416)](o=>{const a=t,i=n(o);if(!i)return;const r=D(o)||a(296);e.push({...i,label:r})});return document[t(312)](t(218))[t(416)](o=>{const a=t;if(!P(i=o)&&!N(i))return;var i;if(H(o))return;const r=n(o);if(!r)return;const c=D(o);e[a(245)]({...r,label:c})}),e}const O=()=>localStorage[s(409)](m)===s(205);function R(t){const e=s,n=encodeURIComponent(t)+"=",o=document[e(343)].split("; ");for(const t of o)if(t[e(294)](n))return decodeURIComponent(t[e(367)](n[e(320)]))}function B(t,e){const n=s,o=localStorage.getItem(x),a=null==o?void 0:Number(o),i=Number[n(329)](e)?Number(e):typeof a===n(360)&&Number[n(329)](a)?a:86400,r=window[n(303)][n(271)]===n(306),c=[n(243)+encodeURIComponent(t),n(393)+i,n(322),n(246)];r&&c[n(245)]("Secure"),document.cookie=c.join("; ")}function F(){const t=s,e=window[t(303)][t(271)]===t(306);document[t(343)]="intent_sid=; Max-Age=0; Path=/; SameSite=Lax"+(e?t(404):"")}function W(){const t=s,e=R(t(293));if(!O())return e&&F(),void(u="");if(e)return void(u=e);const n="undefined"!=typeof crypto&&typeof crypto[t(262)]===t(326)?crypto[t(262)]():Date[t(388)]()+"-"+Math[t(355)]();u=n,B(u)}function j(){return W(),O()&&Boolean(u)&&(()=>{const t=s,e=localStorage.getItem(M);return typeof e===t(283)&&e[t(309)]()[t(320)]>0})()}function z(){return!j()||w}async function J(e){const n=s,o=function(t){const e=s,n=t[e(332)](!1);return n instanceof HTMLInputElement&&t instanceof HTMLInputElement?(Array[e(272)](t[e(299)])[e(416)](({name:t,value:o})=>{n[e(369)](t,o)}),n[e(386)]=U(t)?k(t):t.value,t.disabled&&n[e(369)](e(267),""),n[e(354)]):n instanceof HTMLTextAreaElement&&t instanceof HTMLTextAreaElement?(Array[e(272)](t[e(299)])[e(416)](({name:t,value:e})=>{n.setAttribute(t,e)}),n[e(386)]=U(t)?k(t):t[e(386)],t[e(267)]&&n[e(369)](e(267),""),n.outerHTML):t[e(354)]}(e),a=e[n(310)](),i={useCORS:!0,...{x:window[n(351)],y:window[n(381)],width:window[n(251)],height:window[n(324)],scale:1},ignoreElements:t=>t instanceof Element&&H(t)},r=await t(document.body,i),c=r[n(213)],d=r.height,u=Math[n(395)](c,d),l=.8*Math[n(395)](window.innerWidth,window.innerHeight),f=Math.min(1,l/u),m=12/(a[n(270)]||1),p=Math[n(220)](1,Math[n(395)](f,m)),h=Math[n(260)](c*p),g=Math[n(260)](d*p),w=document[n(226)]("canvas");w.width=h,w[n(270)]=g;const y=w[n(225)]("2d");y[n(275)](r,0,0,c,d,0,0,h,g);const v=C();if(v.length){y[n(230)](),y[n(231)]=1;for(const t of v){const e=Math[n(260)](t.x*p),o=Math[n(260)](t.y*p),a=Math[n(260)](t.w*p),i=Math[n(260)](t.h*p);y.fillStyle=n(297),y[n(256)](e,o,a,i),y.strokeStyle=n(344),y[n(255)]=Math[n(395)](1,Math[n(295)](.02*Math[n(220)](a,i))),y[n(394)](e,o,a,i);const r=Math[n(395)](10,Math.min(22,Math[n(295)](.35*i)));y[n(373)]=r+n(371),y.fillStyle=n(379),y[n(401)]="center",y.textBaseline=n(300);const c="<"+(t.label?.[n(309)]().length?t.label:n(284))+">";y[n(403)](c,e+a/2,o+i/2,a-6)}y.restore()}const b=w[n(377)](n(353),.8);return{html:o,bbox:{x:a.x,y:a.y,w:a[n(213)],h:a[n(270)]},img:b}}function K(){const t=s,e=localStorage.getItem(M),n={"Content-Type":t(346)};return e&&(n["x-sl-access-token"]=e),u&&(n[t(261)]=u),n}async function Z(t,e){const n=s,o=(localStorage[n(409)](I)??S)+n(400),a=JSON[n(383)](t);try{if((await fetch(o,{method:n(411),headers:K(),body:a,keepalive:e,credentials:n(319)})).ok)return}catch{}try{await async function(t,e=!1){const n=s,o=(localStorage.getItem(I)??S)+"/p.gif";if(!(await fetch(o,{method:n(411),headers:K(),body:JSON[n(383)](t),keepalive:e,credentials:n(319),cache:"no-store"})).ok)throw new Error(n(274))}(t,e)}catch{}}async function q(t,e,n,o){const a=s;if(!j())return;const i={...e,localTime:(new Date).toISOString()};(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&(i.value=U(n)?k(n):n[a(386)]);let r="",c={x:0,y:0,w:0,h:0},d="";const u=!(t===a(389)||t===a(241)||t===a(370)),f=Date[a(388)](),m=f-l>=5e3;let p=o;const h=t===a(228)||t===a(417)||t===a(327);u&&!p&&(h||m)&&(p=await J(n),l=f),p&&(r=p.html,c=p[a(254)],d=p[a(222)]);const g={ts:Date[a(388)](),event:t,props:i,html:t===a(241)||t===a(370)?"":r,bbox:c,img:d},w=document.visibilityState===a(301)||t===a(241);await Z(g,w)}function G(){const t=s;return localStorage[t(409)](p)===t(398)}async function _(t={}){const e=s;if(!j())return;const n=typeof t[e(216)]===e(360)&&"number"==typeof t[e(378)];if(n&&g)return;if(!n&&h)return;const o=localStorage[e(409)]("intent:data-ip"),a={context:await c()};o&&(a.ip=o);for(const[n,o]of Object[e(331)](t))a[n]=o;await q("context",a,document[e(217)],{html:"",bbox:{x:0,y:0,w:0,h:0},img:""}),n?g=!0:h=!0}async function X(){const t=s,e={canSend:j(),geoEnabled:G(),deviceGeoSent:g};if(!e.canSend||!e[t(227)]||e[t(376)])return;const n={secure:window[t(384)],proto:location.protocol,host:location[t(224)]};if(n[t(408)]||(t(290),t(316)),!(t(247)in navigator))return;if(v)return;v=!0,w=!0;const o={enableHighAccuracy:!1,maximumAge:3e5,timeout:2e4};Date[t(388)]();try{await(navigator.permissions?.[t(232)]({name:t(247)}))}catch(t){}await new Promise(e=>{const n=t;let a=!1;const i=async(t,n,o)=>{const i=f;a||(a=!0,Date[i(388)](),Number[i(329)](t)&&Number.isFinite(n)&&await _({lat:t,lon:n,source:"device"}),v=!1,w=!1,b=!0,e())};navigator[n(247)][n(363)](t=>{const e=f,n=t[e(382)];i(n.latitude,n.longitude,(n.accuracy,"number"==typeof n[e(350)]&&n[e(350)],"number"==typeof n[e(414)]&&n[e(414)],typeof n[e(233)]===e(360)&&n[e(233)],"number"==typeof n[e(206)]&&n[e(206)],t.timestamp,document[e(402)],document.hasFocus()))},t=>{const e=f,n=t?.[e(352)];1===n?e(278):2===n||(3===n||e(406)),navigator[e(380)],document[e(399)](),location[e(224)],i(void 0,void 0)},o)})}function Y(){const t=s;if(y||!G()||g)return;y=!0;const e=()=>{const t=f;window[t(214)](t(258),e,!0),window[t(214)]("keydown",e,!0),X()};window.addEventListener(t(258),e,!0),window[t(390)](t(392),e,!0)}function Q(){const t=["hasFocus","/events","textAlign","visibilityState","fillText","; Secure","includes","UNKNOWN","name","secure","getItem","data-intent-redact","POST","address-line3","password","altitudeAccuracy","screenshot","forEach","input-submit","cc-exp-month",'input[type="submit"]',"bday","granted","speed","cc-family-name","1865379NAmlZJ","filter","<no visible label>","address-line2","bday-day","width","removeEventListener","setTimeout","lat","body","input, textarea","1709320waTMRO","min","cc-exp-year","img","search","hostname","getContext","createElement","geoEnabled","click","load","save","globalAlpha","query","heading","Name","[onclick]","onerror","right","intent:consent","719784Zfglwq","clearTimeout","page-blur","intent:geo","intent_sid=","address-level3","push","SameSite=Lax","geolocation","split","title","intent:data-sid-max-age","innerWidth","address-level4","family-name","bbox","lineWidth","fillRect","has","pointerdown","capturePhase","round","x-intent-sid","randomUUID","mask","hasAttribute","cc-type","error","disabled","506572JJuzFV","key","height","protocol","from","username","pixel body fallback failed","drawImage","additional-name","cc-exp","PERMISSION_DENIED","type","given-name","ignore","street-address","string","Sensitive","readAsDataURL","bottom","691328jBhPOo","focus","cc-","host","target","webauthn","intent_sid","startsWith","floor","Redacted","#e5e7eb","country","attributes","middle","hidden","address-line1","location","button","7XUapKf","https:","Address","organization-title","trim","getBoundingClientRect","props","querySelectorAll","https://intent.callimacus.ai","TEXTAREA","cc-csc","localhost","blur","closest","omit","length","sex","Path=/","INPUT","innerHeight","address-level1","function","pageview","organization","isFinite","getAttribute","entries","cloneNode","visibilitychange","referrer","bday-year","Unexpected FileReader result type","45OwZjJC",'=""]',"cc-name","email","Phone","Birthday","cookie","#9ca3af","role","application/json",'="mask"], [',"1022816CtMDEO","some","altitude","scrollX","code","image/jpeg","outerHTML","random","onload","1797130fSPJgK","toLowerCase","indexOf","number","Email","href","getCurrentPosition","data-intent-redact-label","Credit card",'[role="button"]',"slice","FileReader error","setAttribute","page-focus","px system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif","bday-month","font","address-level2","country-name","deviceGeoSent","toDataURL","lon","#374151","onLine","scrollY","coords","stringify","isSecureContext","Enter","value","intent:data-client-id","now","scroll","addEventListener","tel","keydown","Max-Age=","strokeRect","max","intent:data-base-url","tagName","enabled"];return(Q=function(){return t})()}W(),window[s(390)](s(229),()=>{const t=s;j()&&(_(),(window[t(384)]||location[t(224)]===t(316))&&(G()&&Y(),window[t(390)](t(288),()=>{!g&&G()&&!v&&b&&X()}),document[t(390)](t(333),()=>{!document[t(301)]&&!g&&G()&&!v&&b&&X()})))}),window.addEventListener("storage",t=>{t[s(269)]===m&&("granted"===localStorage[s(409)](m)?(h=!1,_(),G()&&Y()):(h=!1,g=!1)),t.key===p&&(G()?Y():g=!1)}),window.addEventListener(s(229),()=>{const t=s;j()&&q(t(327),{url:window[t(303)][t(362)],title:document[t(249)],ref:document[t(334)]},document[t(217)])}),addEventListener(s(258),function(t,e){let n=0;return(...o)=>{const a=Date.now();a-n>=e&&(n=a,t(...o))}}(t=>{const e=s;if(z())return;const n=t[e(291)]instanceof Element?t[e(291)][e(318)](E):null;n instanceof HTMLElement&&(d=J(n))},50),{capture:!0,passive:!0}),addEventListener(s(228),async t=>{const e=s;if(z())return;const n=t[e(291)]instanceof Element?t[e(291)][e(318)](E):null;if(!(n instanceof HTMLElement))return;const o=function(t){const e=s;return t[e(330)]("aria-label")??t[e(249)]??t.textContent?.trim()??e(210)}(n),a=d?await d:void 0;d=void 0,await q(e(228),{tag:n[e(397)],label:o},n,a)},!0),addEventListener(s(392),t=>{const e=s;if(!z()&&t[e(269)]===e(385)){const n=t.target;if(n instanceof HTMLElement&&(n[e(397)]===e(323)||n[e(397)]===e(314))){const t=n instanceof HTMLInputElement?n[e(407)]:void 0,o=n.id||void 0;q(e(417),{tag:n[e(397)],name:t??o},n)}}},{capture:!0});let V=!document.hidden&&document[s(399)](),$=document[s(399)]();const tt=()=>{const t=s;if(z())return;const e=!document[t(301)]&&document[t(399)]();e&&($=!0),$||e?e!==V&&(V=e,q(t(e?370:241),{},document.body)):V=e};function et(){const t=["getAttribute","11213360xGQtda","setItem","4596230EwcmFi","10fTLjGW","consent","data-ip","intent_sid","4uIPfsK","1282015MtPhBQ","intent:consent","undefined","2486754DAJIbM","randomUUID","function","42ubyqtZ","granted","intent:data-base-url","random","enabled","geo","19903878nHuGAv","1932780KwBHfz","802923HtesEB","intent:data-sid-max-age","clientId","now","sidMaxAgeSeconds","https://intent.callimacus.ai","disabled","currentScript","intent:geo","number","isFinite"];return(et=function(){return t})()}function nt(t,e){const n=at;try{if(void 0===e)return;localStorage[n(482)](t,e?t===n(490)?n(496):n(499):n(509))}catch{}}function ot(t={}){const e=at;if(localStorage.setItem("intent:data-client-id",t[e(505)]??""),localStorage[e(482)]("intent:data-ip",t.ip??""),localStorage[e(482)](e(497),t.baseUrl??e(508)),typeof t[e(507)]===e(512)&&localStorage[e(482)](e(504),String(t[e(507)])),nt(e(490),t.consent),nt(e(511),t[e(500)]),t[e(485)]){if(!R("intent_sid")){B(typeof crypto!==e(491)&&typeof crypto[e(493)]===e(494)?crypto.randomUUID():Date[e(506)]()+"-"+Math[e(498)](),t[e(507)])}}}function at(t,e){const n=et();return(at=function(t,e){return n[t-=480]})(t,e)}function it(){return R(at(487))}function rt(){W()}function ct(){F()}function st(t){const e=at;Number[e(513)](t)&&localStorage[e(482)](e(504),String(t));const n=R(e(487));n&&B(n,t)}["focus",s(317)][s(416)](t=>{window.addEventListener(t,tt)}),document[s(390)](s(333),tt),window[s(390)](s(389),function(t,e){let n;return(...o)=>{const a=f;void 0!==n&&window[a(240)](n),n=window[a(215)](()=>{n=void 0,t(...o)},e)}}(()=>{const t=s;z()||q(t(389),{scrollX:window[t(351)],scrollY:window.scrollY},document[t(217)])},250),{passive:!0}),window.intent??={send(t,e){j()&&q(t,e,document.body)},define(t,e){const n=s,{type:o}=e,{selector:a}=e,i=e.passive??!0,r=Boolean(e[n(259)]),c=e[n(311)];addEventListener(o,async o=>{const i=n;if(z())return;let r=document[i(217)];if(typeof a===i(283)&&a[i(320)]){const t=o.target instanceof Element?o[i(291)][i(318)](a):void 0;t instanceof HTMLElement&&(r=t)}const s=typeof c===i(326)?c(o,r):c??{};let d;e[i(415)]&&(d=await J(r),l=Date[i(388)]()),await q(t,s,r,d)},{capture:r,passive:i})}},function(){const t=at,e=et();for(;;)try{if(954937===parseInt(t(503))/1+parseInt(t(492))/2+-parseInt(t(502))/3+parseInt(t(488))/4*(-parseInt(t(483))/5)+parseInt(t(495))/6*(parseInt(t(489))/7)+parseInt(t(481))/8+parseInt(t(501))/9*(-parseInt(t(484))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),function(){const t=at;try{const e=document[t(510)];if(!e)return;const n=e[t(480)]("data-customer-id")||void 0,o=e[t(480)](t(486))||void 0,a=e[t(480)]("data-base-url")||void 0;(n||o)&&ot({clientId:n,ip:o,baseUrl:a})}catch{}}();export{ct as clearIntentSessionId,rt as ensureIntentSessionId,it as getIntentSessionId,ot as initIntent,nt as setFlag,st as setIntentSessionMaxAge};
|
|
4
|
+
import t from"html2canvas-pro";function e(t,n){const o=a();return(e=function(t,e){return o[t-=157]})(t,n)}async function n(){const t=e,n=[];if(function(t){const n=e;return n(251)in t&&void 0!==t[n(251)]}(navigator)){const e=navigator[t(251)];e?.[t(267)]&&n[t(218)](e[t(267)]),typeof e?.downlink===t(232)&&n.push(e.downlink+t(226)),typeof e?.[t(259)]===t(232)&&n[t(218)](e[t(259)]+t(240)),e?.saveData&&n.push("saveData")}const o=await async function(t,n=3e3,o=8,a=150){const i=e;if(!("fetch"in window)||!(i(185)in window))return;const r=performance[i(260)]();let c,s=0;await Promise.all(Array[i(188)]({length:o},async()=>{const e=i;for(;performance.now()-r<n+a;){const o=new AbortController,i=(t[e(248)]("?")?"&":"?")+e(241)+Math[e(279)]()[e(158)](36)[e(203)](2);try{const d=await fetch(t+i,{cache:e(184),signal:o.signal,mode:e(275)}),l=d[e(229)]?.getReader();if(!l)break;for(;;){const t=performance[e(260)]();if(t-r>=n+a){o.abort();break}const{done:i,value:d}=await l[e(196)]();if(i)break;c??=t,t-(c??t)>=a&&(s+=d[e(262)])}}catch{}}}));const d=(c??r)+a,l=Math[i(268)](1,performance.now()-d),u=8*s/(l/1e3)/1e6;return Number[i(228)](u)&&u>0?u:void 0}(t(238),3e3,8,150),a=performance.getEntriesByType("navigation")[t(269)](e=>e[t(250)]===t(208));let i;if(a){const e=Math.max(0,a[t(169)]-a.requestStart);i=t(195)+Math[t(231)](e)+t(240)}const r=[];if(typeof o===t(232)&&r[t(218)]("~"+o[t(217)](1)+" Mbps"),i&&r[t(218)](i),n[t(164)]&&r.push("hint: "+n[t(180)](", ")),r[t(164)])return t(162)+r[t(180)](", ")+t(187)}function o(){const t=e;if(!function(t){const n=e;return n(212)in t&&typeof t[n(212)]!==n(234)}(navigator))return;const n=navigator[t(212)],o=Array[t(200)](n[t(214)])?n[t(214)][t(176)](e=>e[t(249)]+" "+e[t(237)]).join(", "):void 0,a=n[t(166)]?""+n[t(166)]+(n[t(182)]?t(242):""):void 0;return[o&&t(199)+o,a&&t(245)+a][t(274)](Boolean)[t(180)](t(198))||void 0}function a(){const t=["128691lURcMQ","5LXbyso","version","/speedtest.bin","userAgent"," ms","cb="," (mobile)","2EuIUCD","x (avail ","Platform: ","Language: ","(pointer: fine)","includes","brand","entryType","connection","coarse","deviceorientation","Referrer: ","Pointer/Touch: ","availHeight","abs","yes","rtt","now","22770924IAdpdc","byteLength"," (β ","CPU: ","CookiesEnabled: ","DateTimeFormat","effectiveType","max","find","235252oOqtvv","removeEventListener","charging","593262moJMBE","filter","cors","cookieEnabled","n/a","getTimezoneOffset","random","intent:geo","toString","onLine","controller","devicePixelRatio","Network: ","790MRSgaq","length","-bit)","platform","(display-mode: standalone)","not charging","responseStart",", maxTouchPoints ","11539418unFCCH","Screen: ","colorDepth","4EGGnMy","Tilt: ","map","Online: ","User agent: "," cores","join","getBattery","mobile","maxTouchPoints","no-store","ReadableStream","orientation"," (active test)","from","language","Battery: ","°, γ ","enabled","hardwareConcurrency","8777058mohxyK","TTFB ~","read","languages"," | ","UA brands: ","isArray",", orientation ","serviceWorker","slice","upright","Viewport: ","Languages: ","Device geolocation: disabled","navigation","32wlTCdI","gamma","Timezone: ","userAgentData","1590477BUCPNJ","brands","floor","availWidth","toFixed","push","function","beta","matches","height","padStart","DeviceOrientationEvent","type"," Mbps","SW-controlled","isFinite","body","getItem","round","number","reclined","undefined"];return(a=function(){return t})()}async function i(t=400){if(e(224)in window&&window.isSecureContext)return new Promise(n=>{let o=!1;const a=t=>{const i=e,r=typeof t[i(220)]===i(232)?t[i(220)]:void 0,c=typeof t[i(210)]===i(232)?t[i(210)]:void 0;if(void 0===r||void 0===c)return;if(o)return;o=!0,window[i(271)]("deviceorientation",a);const s=function(t,n){const o=e,a=Math[o(257)](t),i=Math[o(257)](n);return a<15&&i<15?"flat":o(a>=60?204:233)}(r,c);n(i(175)+s+i(263)+Math[i(231)](r)+i(191)+Math[i(231)](c)+"°)")};window.setTimeout(()=>{const t=e;o||(o=!0,window[t(271)](t(253),a),n(void 0))},t),window.addEventListener("deviceorientation",a,{passive:!0})})}async function r(){const t=e;if(function(t){const n=e;return n(181)in t&&typeof t[n(181)]===n(219)}(navigator))try{const e=await navigator.getBattery(),n=Math[t(231)](100*e.level),o=[(Number.isFinite(n)?n:0)+"%",e[t(272)]?"charging":t(168)];return t(190)+o.join(", ")}catch{return}}async function c(){const t=e,a=(new(Intl[t(266)])).resolvedOptions().timeZone,c=function(t){const n=e,o=t<=0?"+":"-",a=Math[n(257)](t);return""+o+String(Math[n(215)](a/60))[n(223)](2,"0")+":"+String(a%60).padStart(2,"0")}((new Date)[t(278)]()),s=[];s[t(218)](t(246)+navigator[t(189)]),navigator[t(197)]?.[t(164)]&&s[t(218)](t(206)+navigator[t(197)].join(", ")),s[t(218)](t(178)+navigator[t(239)]);const d=o();d&&s[t(218)](d),s[t(218)](t(211)+a+" (UTC"+c+")"),s[t(218)]("Local time: "+(new Date).toString());const l=window[t(161)]||1;s[t(218)](t(172)+screen.width+"x"+screen[t(222)]+" @"+l+t(244)+screen[t(216)]+"x"+screen[t(256)]+", "+screen[t(173)]+t(165));const u=screen.orientation&&"type"in screen.orientation?screen[t(186)][t(225)]:void 0;s[t(218)](t(205)+window.innerWidth+"x"+window.innerHeight+(u?t(201)+u:"")),s[t(218)](t(264)+navigator[t(193)]+t(179));const f=await n();f&&s.push(f),s.push(function(){const t=e,n=typeof matchMedia===t(219)&&matchMedia("(pointer: coarse)")[t(221)],o="function"==typeof matchMedia&&matchMedia(t(247)).matches,a=n?t(252):o?"fine":"unknown",i=typeof navigator[t(183)]===t(232)?navigator.maxTouchPoints:0;return t(255)+a+t(170)+i}());const m=await r();m&&s[t(218)](m),s[t(218)](t(265)+(navigator[t(276)]?t(258):"no")+"; DNT: "+(navigator.doNotTrack??t(277))),s[t(218)](t(177)+(navigator[t(159)]?t(258):"no")),document.referrer&&s.push(t(254)+document.referrer),s[t(218)](function(){const t=e,n=typeof matchMedia===t(219)&&matchMedia(t(167))[t(221)];return"PWA: "+(Boolean(navigator[t(202)]?.[t(160)])?t(227):"no SW")+", display-mode standalone: "+(n?t(258):"no")}());const p=await i();p&&s[t(218)](p);const h="undefined"!=typeof localStorage&&localStorage[t(230)](t(157))===t(192);return s[t(218)](h?"Device geolocation: enabled":t(207)),s[t(180)](t(198))}!function(){const t=e,n=a();for(;;)try{if(829989===-parseInt(t(243))/1*(parseInt(t(270))/2)+-parseInt(t(273))/3*(parseInt(t(174))/4)+parseInt(t(236))/5*(-parseInt(t(194))/6)+parseInt(t(213))/7*(parseInt(t(209))/8)+parseInt(t(235))/9*(-parseInt(t(163))/10)+parseInt(t(171))/11+parseInt(t(261))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}();const s=U;!function(){const t=U,e=f();for(;;)try{if(568338===parseInt(t(203))/1+-parseInt(t(373))/2+-parseInt(t(297))/3+parseInt(t(311))/4+-parseInt(t(371))/5+-parseInt(t(365))/6*(parseInt(t(192))/7)+parseInt(t(335))/8)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();let d,l="",u=0;function f(){const t=["aria-label","#9ca3af","secure","removeEventListener","min","Organization","getAttribute","focus","Sensitive","3709096cSXgNg","pointerdown","fillText","Name","result","has","postal-code","body","setTimeout","join","host","getItem","street-address","address-line1","error","data-intent-redact","load","hostname","image/jpeg","trim","intent:data-ip","omit","device","getBoundingClientRect","3301712cwxVXT","heading","additional-name","given-name","SameSite=Lax","keydown","Secure","Max-Age=","intent:data-base-url","height","Phone","onLine","pageview","hasAttribute","filter","Path=/","closest","textContent","pixel body fallback failed","country-name","a[href]","number","data-intent-redact-label","string","function","address-line3","role","; Secure","defineProperty","title","47820cxMSMA","location","POSITION_UNAVAILABLE","Unexpected FileReader result type","attributes",'=""]',"1920070FKMdnq","protocol","1524260HxyWOF","address-level4","intent_sid=",'input[type="button"]','input[type="submit"]',"hasFocus","Redacted","accuracy","floor","textAlign","cc-exp-month","ignore","readAsDataURL","strokeStyle","email","granted","target","cookie","TIMEOUT","visibilityState","PERMISSION_DENIED","Password","type","randomUUID","innerHeight","textBaseline","altitude","html","page-blur","px system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif","onload","address-level2","clearTimeout","addEventListener","tagName","bday-day","mask",'[role="button"]',"fillStyle","entries","tel","301MTrQkP","__intent__sdk__initialized__","toDataURL","font","key","speed","name","country","family-name","<no visible label>","lon","868822oOjdmu","context","cc-type","coords","data-html2canvas-ignore","bday","cc-given-name","visibilitychange","Address","no-store","UNKNOWN","intent:geo","address-level1","intent:consent","hidden","autocomplete","scrollY","INPUT","Sex","setAttribute","input-submit","undefined","round","page-focus","bottom","https://intent.callimacus.ai","POST","click","href","onerror","indexOf","left",'[role="link"]',"querySelectorAll","disabled","fillRect","value","cloneNode","FileReader error","width","drawImage","isSecureContext","toISOString","bday-month","lat","geoEnabled","stringify","scrollX","/p.gif","isFinite","length","cc-name","toLowerCase","outerHTML","password","query","#e5e7eb","cc-additional-name","organization-title","push","input, textarea","max","center","localhost","intent:data-client-id","address-level3","deviceGeoSent","/events","middle","scroll","timestamp","referrer","intent","[onclick]","TEXTAREA","startsWith","altitudeAccuracy","canvas","intent_sid","#374151","slice","some","split","forEach","address-line2","cc-family-name","innerWidth","longitude","now","message","right","getCurrentPosition","label","createElement","454854jJNegI","lineWidth","geolocation","cc-number","includes"];return(f=function(){return t})()}const m=s(216),p=s(214);let h=!1,g=!1,w=!1,y=!1,v=!1,b=!1;const M=s(267),x=s(331),S=s(343),I=s(228),T=s(193),E=["button",s(355),"a",s(377),s(376),s(410),s(235),s(276)].join(","),L=s(326),A=s(357),k=new Set(["name",s(338),s(337),"family-name","nickname","username",s(387),s(191),"organization","organization-title",s(323),s(324),s(287),"address-line3",s(215),s(404),"address-level3",s(374),s(199),s(354),"postal-code",s(254),"cc-given-name",s(260),s(288),s(300),"cc-exp",s(383),"cc-exp-year","cc-csc",s(205),s(208),s(408),s(246),"bday-year","sex","webauthn"]);function C(t){return"<"+N(t)+">"}function N(t){const e=s,n=(t[e(308)]?.(A)??"")[e(330)]();if(n)return n;const o=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?(t[e(218)]||"").toLowerCase()[e(330)]()[e(285)](/\s+/)[e(349)](Boolean):[];return t instanceof HTMLInputElement&&t.type===e(257)?e(394):o[e(284)](t=>t[e(278)]("cc-"))?"Credit card":o[e(284)](t=>["name","given-name",e(200),e(337),e(254),e(209),"cc-family-name"].includes(t))?e(314):o[e(301)]("email")?"Email":o[e(301)](e(191))?e(345):o.some(t=>t[e(278)]("bday"))?"Birthday":o.includes("sex")?e(221):o[e(284)](t=>["street-address",e(324),e(287),e(360),e(215),"address-level2",e(268),e(374),e(317),"country",e(354)][e(301)](t))?e(211):o[e(301)]("organization")||o[e(301)](e(261))?e(307):"mask"===t[e(308)]?.(L)?.[e(255)]()?"Redacted":"Sensitive"}function D(t){const e=s;return t[e(348)](e(207))||t[e(308)](L)?.toLowerCase()===e(384)}function U(t,e){const n=f();return(U=function(t,e){return n[t-=189]})(t,e)}function H(t){const e=s,n=t[e(308)](L);return""===n||n?.[e(255)]()===e(409)}function R(t){const e=s;if(t instanceof HTMLInputElement){if(t[e(395)]===e(257))return!0;if("search"===t[e(395)])return!1;const n=t[e(308)](e(361));if(n&&"searchbox"===n.toLowerCase())return!1;if((t[e(218)]||"")[e(255)]()[e(330)]().split(/\s+/)[e(349)](Boolean).some(t=>k[e(316)](t)))return!0}if(t instanceof HTMLTextAreaElement){if((t[e(218)]||"")[e(255)]()[e(330)]()[e(285)](/\s+/).filter(Boolean)[e(284)](t=>k[e(316)](t)))return!0}return!1}function P(t){return!!H(t)||!!R(t)}function O(){const t=s,e=[],n=t=>{const e=U,n=t[e(334)]();if(n[e(242)]<=0||n[e(344)]<=0)return;const o=Math[e(264)](0,n[e(234)]),a=Math.max(0,n.top),i=Math.max(0,Math[e(306)](n[e(293)],window[e(289)])-o),r=Math[e(264)](0,Math[e(306)](n[e(227)],window[e(397)])-a);return i<=0||r<=0?void 0:{x:o,y:a,w:i,h:r}};document.querySelectorAll("["+L+'="mask"], ['+L+t(370))[t(286)](o=>{const a=t,i=n(o);if(!i)return;const r=N(o)||a(379);e[a(262)]({...i,label:r})});return document[t(236)](t(263))[t(286)](o=>{const a=t;if(!H(i=o)&&!R(i))return;var i;if(D(o))return;const r=n(o);if(!r)return;const c=N(o);e[a(262)]({...r,label:c})}),e}const B=()=>"granted"===localStorage[s(322)](m);function _(t){const e=s,n=encodeURIComponent(t)+"=",o=document[e(390)][e(285)]("; ");for(const t of o)if(t[e(278)](n))return decodeURIComponent(t[e(283)](n[e(253)]))}function F(t,e){const n=s,o=localStorage.getItem("intent:data-sid-max-age"),a=null==o?void 0:Number(o),i=Number[n(252)](e)?Number(e):"number"==typeof a&&Number[n(252)](a)?a:86400,r="https:"===window[n(366)].protocol,c=[n(375)+encodeURIComponent(t),n(342)+i,n(350),n(339)];r&&c.push(n(341)),document[n(390)]=c[n(320)]("; ")}function W(){const t=s,e="https:"===window[t(366)][t(372)];document[t(390)]="intent_sid=; Max-Age=0; Path=/; SameSite=Lax"+(e?t(362):"")}function j(){const t=s,e=_(t(281));if(!B())return e&&W(),void(l="");if(e)return void(l=e);const n=typeof crypto!==t(224)&&typeof crypto[t(396)]===t(359)?crypto[t(396)]():Date.now()+"-"+Math.random();l=n,F(l)}function z(){return j(),B()&&Boolean(l)&&(()=>{const t=s,e=localStorage[t(322)](M);return typeof e===t(358)&&e.trim()[t(253)]>0})()}function X(){return!z()||w}async function q(e){const n=s,o=function(t){const e=s,n=t[e(240)](!1);return n instanceof HTMLInputElement&&t instanceof HTMLInputElement?(Array.from(t[e(369)]).forEach(({name:t,value:e})=>{n.setAttribute(t,e)}),n[e(239)]=P(t)?C(t):t[e(239)],t[e(237)]&&n[e(222)](e(237),""),n.outerHTML):n instanceof HTMLTextAreaElement&&t instanceof HTMLTextAreaElement?(Array.from(t[e(369)])[e(286)](({name:t,value:o})=>{n[e(222)](t,o)}),n.value=P(t)?C(t):t[e(239)],t[e(237)]&&n[e(222)](e(237),""),n[e(256)]):t[e(256)]}(e),a=e.getBoundingClientRect(),i={useCORS:!0,...{x:window[n(250)],y:window[n(219)],width:window.innerWidth,height:window[n(397)],scale:1},ignoreElements:t=>t instanceof Element&&D(t)},r=await t(document[n(318)],i),c=r.width,d=r.height,l=Math[n(264)](c,d),u=.8*Math.max(window.innerWidth,window[n(397)]),f=Math[n(306)](1,u/l),m=12/(a[n(344)]||1),p=Math[n(306)](1,Math[n(264)](f,m)),h=Math.round(c*p),g=Math[n(225)](d*p),w=document[n(296)](n(280));w.width=h,w[n(344)]=g;const y=w.getContext("2d");y[n(243)](r,0,0,c,d,0,0,h,g);const v=O();if(v.length){y.save(),y.globalAlpha=1;for(const t of v){const e=Math[n(225)](t.x*p),o=Math[n(225)](t.y*p),a=Math[n(225)](t.w*p),i=Math[n(225)](t.h*p);y[n(189)]=n(259),y[n(238)](e,o,a,i),y[n(386)]=n(303),y[n(298)]=Math.max(1,Math[n(381)](.02*Math[n(306)](a,i))),y.strokeRect(e,o,a,i);const r=Math[n(264)](10,Math.min(22,Math[n(381)](.35*i)));y[n(195)]=r+n(402),y[n(189)]=n(282),y[n(382)]=n(265),y[n(398)]=n(271);const c="<"+(t[n(295)]?.[n(330)]()[n(253)]?t.label:n(310))+">";y[n(313)](c,e+a/2,o+i/2,a-6)}y.restore()}const b=w[n(194)](n(329),.8);return{html:o,bbox:{x:a.x,y:a.y,w:a[n(242)],h:a[n(344)]},img:b}}function Q(){const t=localStorage[s(322)](M),e={"Content-Type":"application/json"};return t&&(e["x-sl-access-token"]=t),l&&(e["x-intent-sid"]=l),e}async function J(t,e){const n=s,o=(localStorage[n(322)](S)??I)+n(270),a=localStorage[n(322)](M)??void 0,i=JSON[n(249)]({...t,clientId:a});try{if((await fetch(o,{method:n(229),headers:Q(),body:i,keepalive:e,credentials:n(332)})).ok)return}catch{}try{await async function(t,e=!1){const n=s,o=(localStorage.getItem(S)??I)+n(251);if(!(await fetch(o,{method:n(229),headers:Q(),body:JSON[n(249)](t),keepalive:e,credentials:n(332),cache:n(212)})).ok)throw new Error(n(353))}(t,e)}catch{}}async function G(t,e,n,o){const a=s;if(!z())return;const i={...e,localTime:(new Date)[a(245)]()};(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&(i[a(239)]=P(n)?C(n):n[a(239)]);let r="",c={x:0,y:0,w:0,h:0},d="";const l=!(t===a(272)||"page-blur"===t||t===a(226)),f=Date[a(291)](),m=f-u>=5e3;let p=o;const h=t===a(230)||t===a(223)||"pageview"===t;l&&!p&&(h||m)&&(p=await q(n),u=f),p&&(r=p[a(400)],c=p.bbox,d=p.img);const g={ts:Date[a(291)](),event:t,props:i,html:t===a(401)||t===a(226)?"":r,bbox:c,img:d},w="hidden"===document[a(392)]||t===a(401);await J(g,w)}function Y(){return"enabled"===localStorage[s(322)](p)}async function K(t={}){const e=s;if(!z())return;const n=typeof t[e(247)]===e(356)&&typeof t[e(202)]===e(356);if(n&&g)return;if(!n&&h)return;const o=localStorage.getItem(x),a={context:await c()};o&&(a.ip=o);for(const[n,o]of Object[e(190)](t))a[n]=o;await G(e(204),a,document[e(318)],{html:"",bbox:{x:0,y:0,w:0,h:0},img:""}),n?g=!0:h=!0}async function V(){const t=s,e={canSend:z(),geoEnabled:Y(),deviceGeoSent:g};if(!e.canSend||!e[t(248)]||e[t(269)])return;const n={secure:window.isSecureContext,proto:location.protocol,host:location[t(328)]};if(n[t(304)]||(t(321),t(266)),!(t(299)in navigator))return;if(v)return;v=!0,w=!0;const o={enableHighAccuracy:!1,maximumAge:3e5,timeout:2e4};Date[t(291)]();try{await(navigator.permissions?.[t(258)]({name:t(299)}))}catch(t){}await new Promise(e=>{const n=t;let a=!1;const i=async(t,n,o)=>{const i=U;a||(a=!0,Date[i(291)](),Number[i(252)](t)&&Number[i(252)](n)&&await K({lat:t,lon:n,source:i(333)}),v=!1,w=!1,b=!0,e())};navigator.geolocation[n(294)](t=>{const e=U,n=t[e(206)];i(n.latitude,n[e(290)],(n[e(380)],typeof n[e(399)]===e(356)&&n[e(399)],"number"==typeof n.altitudeAccuracy&&n[e(279)],typeof n[e(336)]===e(356)&&n[e(336)],typeof n[e(197)]===e(356)&&n[e(197)],t[e(273)],document[e(392)],document[e(378)]()))},t=>{const e=U,n=t?.code;e(1===n?393:2===n?367:3===n?391:213),t?.[e(292)],navigator[e(346)],document[e(392)],document[e(378)](),window[e(244)],location[e(328)],i(void 0,void 0)},o)})}function Z(){const t=s;if(y||!Y()||g)return;y=!0;const e=()=>{const t=U;window[t(305)](t(312),e,!0),window.removeEventListener(t(340),e,!0),V()};window[t(406)]("pointerdown",e,!0),window.addEventListener(t(340),e,!0)}j();let $=!document.hidden&&document[s(378)](),tt=document[s(378)]();const et=()=>{const t=s;if(X())return;const e=!document[t(217)]&&document[t(378)]();e&&(tt=!0),tt||e?e!==$&&($=e,G(e?"page-focus":t(401),{},document[t(318)])):$=e};function nt(){const t=s;(function(){const t=s,e=globalThis;return!e[T]&&(Object[t(363)](e,T,{value:!0,configurable:!1,enumerable:!1,writable:!1}),!0)})()&&(window.addEventListener(t(327),()=>{const e=t;z()&&(K(),(window.isSecureContext||location[e(328)]===e(266))&&(Y()&&Z(),window[e(406)](e(309),()=>{!g&&Y()&&!v&&b&&V()}),document[e(406)]("visibilitychange",()=>{!document.hidden&&!g&&Y()&&!v&&b&&V()})))}),window[t(406)]("storage",e=>{const n=t;e[n(196)]===m&&(function(){const t=s;return localStorage[t(322)](m)===t(388)}()?(h=!1,K(),Y()&&Z()):(h=!1,g=!1)),e[n(196)]===p&&(Y()?Z():g=!1)}),window[t(406)](t(327),()=>{const e=t;z()&&G(e(347),{url:window[e(366)][e(231)],title:document[e(364)],ref:document[e(274)]},document[e(318)])}),addEventListener("pointerdown",function(t,e){let n=0;return(...o)=>{const a=Date.now();a-n>=e&&(n=a,t(...o))}}(e=>{const n=t;if(X())return;const o=e[n(389)]instanceof Element?e.target[n(351)](E):null;o instanceof HTMLElement&&(d=q(o))},50),{capture:!0,passive:!0}),addEventListener(t(230),async e=>{const n=t;if(X())return;const o=e[n(389)]instanceof Element?e[n(389)].closest(E):null;if(!(o instanceof HTMLElement))return;const a=function(t){const e=s;return t[e(308)](e(302))??t[e(364)]??t[e(352)]?.[e(330)]()??e(201)}(o),i=d?await d:void 0;d=void 0,await G(n(230),{tag:o[n(407)],label:a},o,i)},!0),addEventListener(t(340),e=>{const n=t;if(!X()&&"Enter"===e[n(196)]){const t=e[n(389)];if(t instanceof HTMLElement&&(t[n(407)]===n(220)||t[n(407)]===n(277))){const e=t instanceof HTMLInputElement?t[n(198)]:void 0,o=t.id||void 0;G(n(223),{tag:t[n(407)],name:e??o},t)}}},{capture:!0}),["focus","blur"][t(286)](e=>{window[t(406)](e,et)}),document[t(406)](t(210),et),window[t(406)](t(272),function(t,e){let n;return(...o)=>{const a=U;void 0!==n&&window[a(405)](n),n=window[a(319)](()=>{n=void 0,t(...o)},e)}}(()=>{const e=t;X()||G("scroll",{scrollX:window.scrollX,scrollY:window[e(219)]},document[e(318)])},250),{passive:!0}),window[t(275)]??={send(e,n){const o=t;z()&&G(e,n,document[o(318)])}})}function ot(t,e){const n=ct;try{if(void 0===e)return;localStorage.setItem(t,e?t===n(293)?"granted":n(291):"disabled")}catch{}}function at(t={}){const e=ct;if(localStorage[e(294)]("intent:data-client-id",t.clientId??""),localStorage.setItem(e(287),t.ip??""),localStorage[e(294)](e(274),t[e(295)]??e(280)),"number"==typeof t[e(275)]&&localStorage[e(294)](e(288),String(t[e(275)])),ot(e(293),t[e(285)]),ot(e(283),t[e(297)]),t.consent){if(!_(e(301))){F(typeof crypto!==e(279)&&typeof crypto.randomUUID===e(277)?crypto[e(296)]():Date[e(289)]()+"-"+Math[e(276)](),t[e(275)])}}nt()}function it(){return _("intent_sid")}function rt(){j()}function ct(t,e){const n=st();return(ct=function(t,e){return n[t-=274]})(t,e)}function st(){const t=["8imwYzt","intent:data-ip","intent:data-sid-max-age","now","9RQCdHU","enabled","206395LZucEF","intent:consent","setItem","baseUrl","randomUUID","geo","443363QEkmjB","isFinite","3857686ZRXQYC","intent_sid","intent:data-base-url","sidMaxAgeSeconds","random","function","916180atLQCr","undefined","https://intent.callimacus.ai","1365138NPJkUp","850596ocFeWG","intent:geo","10686504bOAeBQ","consent"];return(st=function(){return t})()}function dt(){W()}function lt(t){const e=ct;Number[e(299)](t)&&localStorage[e(294)](e(288),String(t));const n=_("intent_sid");n&&F(n,t)}!function(){const t=ct,e=st();for(;;)try{if(279100===-parseInt(t(298))/1+-parseInt(t(278))/2+parseInt(t(281))/3+parseInt(t(286))/4*(parseInt(t(292))/5)+-parseInt(t(282))/6+-parseInt(t(300))/7+parseInt(t(284))/8*(parseInt(t(290))/9))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();export{dt as clearIntentSessionId,rt as ensureIntentSessionId,it as getIntentSessionId,at as initIntent,ot as setFlag,lt as setIntentSessionMaxAge};
|