@i.un/libs 1.0.8 → 1.0.10
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 +219 -15
- package/dist/common/singleExecutionWrapper.d.ts +2 -4
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +1 -1
- package/dist/index.modern.js.map +1 -1
- package/dist/index.module.js +1 -1
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/linkedin/dom.d.ts +18 -0
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -18,13 +18,18 @@ pnpm add @i.un/libs
|
|
|
18
18
|
## 🚀 快速开始
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
|
-
import { debounce, createElement, cloneDeep } from '@i.un/libs';
|
|
21
|
+
import { debounce, singleFlight, createElement, cloneDeep } from '@i.un/libs';
|
|
22
22
|
|
|
23
23
|
// 防抖函数
|
|
24
24
|
const debouncedFn = debounce(() => {
|
|
25
25
|
console.log('防抖执行');
|
|
26
26
|
}, 300);
|
|
27
27
|
|
|
28
|
+
// 单飞:并发调用只请求一次,所有调用方共享结果
|
|
29
|
+
const fetchUser = singleFlight((id: string) => fetch(`/api/users/${id}`).then(r => r.json()), {
|
|
30
|
+
key: (id) => id,
|
|
31
|
+
});
|
|
32
|
+
|
|
28
33
|
// 创建DOM元素
|
|
29
34
|
const button = createElement({
|
|
30
35
|
tag: 'button',
|
|
@@ -41,23 +46,35 @@ const cloned = cloneDeep({ name: 'test', items: [1, 2, 3] });
|
|
|
41
46
|
|
|
42
47
|
### 🔧 通用工具 (Common)
|
|
43
48
|
|
|
44
|
-
####
|
|
49
|
+
#### 防抖和延迟
|
|
45
50
|
- `debounce(func, wait)` - 防抖函数
|
|
46
|
-
- `delayExecution(callback, delay, ...args)` -
|
|
51
|
+
- `delayExecution(callback, delay, ...args)` - 延迟执行函数,返回 Promise
|
|
52
|
+
|
|
53
|
+
#### 并发控制
|
|
54
|
+
- `singleFlight(func, options?)` - 单飞:并发调用共享同一次执行
|
|
55
|
+
- `singleExecutionWrapper(func, minTime?)` - 进行中则丢弃,立即返回 `RealUndefined`
|
|
56
|
+
- `coalesce(func, options?)` - 合并尾部:执行期间的触发合并成一次补跑
|
|
57
|
+
- `Mutex` - 互斥锁,任务串行执行
|
|
58
|
+
- `KeyedMutex` - 按 key 分组的互斥锁
|
|
59
|
+
- `serialize(func, options?)` - 把函数包成自动排队的版本
|
|
47
60
|
|
|
48
61
|
#### 对象操作
|
|
49
62
|
- `cloneDeep(obj)` - 深度克隆对象
|
|
63
|
+
- `isEqual(a, b)` - 深度相等比较
|
|
50
64
|
- `createDefaultObject(defaultValue)` - 创建带默认值的代理对象
|
|
51
65
|
- `isCloneable(obj)` - 检查对象是否可克隆
|
|
52
66
|
- `isPrimitive(value)` - 检查值是否为原始类型
|
|
53
67
|
|
|
54
|
-
####
|
|
68
|
+
#### 缓存
|
|
55
69
|
- `cacheWrapper(func, setting)` - 为异步函数添加缓存功能
|
|
56
|
-
- `singleExecutionWrapper(func)` - 单次执行包装器
|
|
57
70
|
- `generateStableUniqueKey(args)` - 生成稳定的唯一键
|
|
58
71
|
|
|
59
72
|
#### 存储
|
|
60
|
-
- `MemoryStore` -
|
|
73
|
+
- `MemoryStore` - 内存存储,与 `WebStore` / `ChromeStore` 同一套接口
|
|
74
|
+
|
|
75
|
+
#### 其他
|
|
76
|
+
- `getGlobal()` - 获取当前环境的全局对象
|
|
77
|
+
- `RealUndefined` - 表示「真正的未定义」的 Symbol 哨兵值
|
|
61
78
|
|
|
62
79
|
### 🌐 浏览器工具 (Browser)
|
|
63
80
|
|
|
@@ -70,23 +87,142 @@ const cloned = cloneDeep({ name: 'test', items: [1, 2, 3] });
|
|
|
70
87
|
- `scrollToBottom(dom)` - 滚动到底部
|
|
71
88
|
- `scrollToBottomIfNeeded(dom)` - 智能滚动到底部
|
|
72
89
|
|
|
73
|
-
####
|
|
74
|
-
- `
|
|
90
|
+
#### 拖拽
|
|
91
|
+
- `Draggable` - 让元素可拖拽
|
|
75
92
|
|
|
76
93
|
#### 存储
|
|
77
|
-
- `WebStore` -
|
|
94
|
+
- `WebStore` - `localStorage` / `sessionStorage` 封装
|
|
78
95
|
|
|
79
|
-
###
|
|
96
|
+
### 🔌 Chrome 扩展工具 (Chrome)
|
|
80
97
|
|
|
81
|
-
|
|
98
|
+
#### 存储
|
|
99
|
+
- `ChromeStore` - `chrome.storage.local` / `chrome.storage.sync` 封装
|
|
82
100
|
|
|
83
|
-
|
|
101
|
+
#### 消息通信
|
|
102
|
+
- `createMessageBus(config?)` - 类型安全的消息总线,统一 background / content script / tab 之间的通信
|
|
103
|
+
- `isErrorResponse(res)` - 判断消息响应是否为错误
|
|
104
|
+
|
|
105
|
+
#### Cookie 与扩展信息
|
|
106
|
+
- `getCookie(url, name, onlyValue?)` - 读取单个 cookie
|
|
107
|
+
- `getCookies(url, stringified?)` - 读取指定 URL 下的全部 cookie
|
|
108
|
+
- `getExtensionInfo()` - 获取扩展的 locale、ID、版本
|
|
84
109
|
|
|
85
|
-
|
|
86
|
-
- `
|
|
110
|
+
#### 身份验证
|
|
111
|
+
- `launchWebAuthFlow(params)` - 发起 OAuth 授权流程
|
|
112
|
+
- `decodeJWT(token)` - 解析 JWT 的 payload
|
|
87
113
|
|
|
88
114
|
## 📖 详细文档
|
|
89
115
|
|
|
116
|
+
### 并发控制
|
|
117
|
+
|
|
118
|
+
四种原语按「并发调用发生时怎么办」区分,选错会引入很隐蔽的 bug:
|
|
119
|
+
|
|
120
|
+
| 原语 | 并发时 | 后来者拿得到结果 | 典型场景 |
|
|
121
|
+
| --- | --- | --- | --- |
|
|
122
|
+
| `singleFlight` | 复用进行中的那次 | 是,同一个 Promise | 同一份数据被多处同时请求 |
|
|
123
|
+
| `singleExecutionWrapper` | 丢弃,立即返回 `RealUndefined` | 否 | 重复执行无意义,且要立刻脱身 |
|
|
124
|
+
| `coalesce` | 合并成一次补跑 | 否(`Promise<void>`) | 触发携带新状态,丢了就丢了 |
|
|
125
|
+
| `Mutex` / `serialize` | 排队串行 | 是 | 读-改-写共享资源 |
|
|
126
|
+
|
|
127
|
+
四者都只管「同一时刻」的并发,**不做结果缓存**。跨次调用要不要重复执行是缓存层的职责,请配合 `cacheWrapper`。
|
|
128
|
+
|
|
129
|
+
#### singleFlight —— 共享同一次执行
|
|
130
|
+
|
|
131
|
+
```typescript
|
|
132
|
+
import { singleFlight } from '@i.un/libs';
|
|
133
|
+
|
|
134
|
+
const fetchProfile = singleFlight(
|
|
135
|
+
(id: string) => fetch(`/api/profile/${id}`).then(r => r.json()),
|
|
136
|
+
{ key: (id) => id },
|
|
137
|
+
);
|
|
138
|
+
|
|
139
|
+
// 同一个 id 并发调用只发一个请求,两个调用方拿到同一份结果
|
|
140
|
+
const [a, b] = await Promise.all([fetchProfile('x'), fetchProfile('x')]);
|
|
141
|
+
|
|
142
|
+
fetchProfile.isRunning('x'); // 对应槽位是否有调用在进行中
|
|
143
|
+
fetchProfile.size; // 进行中的槽位数量
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
注意:一次失败会传给所有调用方;首次调用卡住时,后来者会跟着挂。高频事件驱动的场景下,需要「立刻脱身」的请用 `singleExecutionWrapper`。
|
|
147
|
+
|
|
148
|
+
#### singleExecutionWrapper —— 进行中则丢弃
|
|
149
|
+
|
|
150
|
+
```typescript
|
|
151
|
+
import { singleExecutionWrapper, RealUndefined } from '@i.un/libs';
|
|
152
|
+
|
|
153
|
+
const submit = singleExecutionWrapper(async (form: FormData) => {
|
|
154
|
+
await fetch('/api/submit', { method: 'POST', body: form });
|
|
155
|
+
}, 800); // minTime:即使任务提前完成,也至少锁定 800ms,防连点
|
|
156
|
+
|
|
157
|
+
const result = await submit(form);
|
|
158
|
+
if (result === RealUndefined) {
|
|
159
|
+
// 上一次还没结束,本次被丢弃
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
#### coalesce —— 合并尾部
|
|
164
|
+
|
|
165
|
+
适用于「触发意味着状态变了,而进行中那轮读到的是旧状态」。丢弃会永久丢掉新状态,共享结果同样丢,只有补跑一次才能收敛到最新状态。
|
|
166
|
+
|
|
167
|
+
```typescript
|
|
168
|
+
import { coalesce } from '@i.un/libs';
|
|
169
|
+
|
|
170
|
+
const syncState = coalesce(async () => {
|
|
171
|
+
const latest = await readState();
|
|
172
|
+
await push(latest);
|
|
173
|
+
}, {
|
|
174
|
+
onError: (err) => console.error(err), // 返回的 Promise 永不 reject,失败走这里
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
// 首次立即执行;执行期间的多次触发合并成结束后的一次补跑
|
|
178
|
+
store.subscribe(() => syncState());
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
和 `debounce` 正好相反:`debounce` 延迟首次响应,`coalesce` 首次立即执行、把合并放在尾部。两者可以叠加。
|
|
182
|
+
|
|
183
|
+
#### Mutex —— 互斥锁
|
|
184
|
+
|
|
185
|
+
读-改-写共享资源时,读和写各是一次异步调用,中间可以被别的调用插入,后写的会覆盖先写的。把整段放进同一把锁里就不会交错:
|
|
186
|
+
|
|
187
|
+
```typescript
|
|
188
|
+
import { Mutex } from '@i.un/libs';
|
|
189
|
+
|
|
190
|
+
const storageLock = new Mutex();
|
|
191
|
+
|
|
192
|
+
const take = (id: string) => storageLock.run(async () => {
|
|
193
|
+
const map = await readMap();
|
|
194
|
+
const item = map[id];
|
|
195
|
+
delete map[id];
|
|
196
|
+
await writeMap(map);
|
|
197
|
+
return item;
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
const drop = (id: string) => storageLock.run(async () => {
|
|
201
|
+
const map = await readMap();
|
|
202
|
+
delete map[id];
|
|
203
|
+
await writeMap(map);
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
// take 与 drop 并发时也不会交错
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
**多个函数操作同一份资源时必须共用一个 `Mutex` 实例**,各自包一层 `serialize` 是挡不住交错的。
|
|
210
|
+
|
|
211
|
+
只需要串行化单个函数时用 `serialize`;key 是动态无界的(用户 ID、tab ID 等)用 `KeyedMutex`,它会在队列排空后自动回收 key。
|
|
212
|
+
|
|
213
|
+
```typescript
|
|
214
|
+
import { serialize, KeyedMutex } from '@i.un/libs';
|
|
215
|
+
|
|
216
|
+
const writeProfile = serialize(async (id: string, patch: object) => { /* ... */ }, {
|
|
217
|
+
key: (id) => id, // 相同 id 串行,不同 id 并行
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
const locks = new KeyedMutex();
|
|
221
|
+
await locks.run(userId, async () => { /* ... */ });
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
> ⚠️ 被包装的函数不能通过包装后的入口调用自己:`singleFlight` 会拿到自己那个尚未完成的 Promise 永远等下去,`Mutex` 会排在自己后面死锁。需要递归时把真正的逻辑抽成内部函数,只在最外层入口做包装。
|
|
225
|
+
|
|
90
226
|
### 防抖函数
|
|
91
227
|
|
|
92
228
|
```typescript
|
|
@@ -102,6 +238,74 @@ debouncedSearch('ab');
|
|
|
102
238
|
debouncedSearch('abc'); // 只有这次会执行
|
|
103
239
|
```
|
|
104
240
|
|
|
241
|
+
### 存储
|
|
242
|
+
|
|
243
|
+
`MemoryStore` / `WebStore` / `ChromeStore` 是同一套接口的三种后端,都是按 `storageKey` 单例、带类型的键值存储:
|
|
244
|
+
|
|
245
|
+
```typescript
|
|
246
|
+
import { ChromeStore, WebStore, MemoryStore } from '@i.un/libs';
|
|
247
|
+
|
|
248
|
+
type UserData = { email: string; loginAt: number };
|
|
249
|
+
|
|
250
|
+
// Chrome 扩展:chrome.storage.local / sync,接口全部异步
|
|
251
|
+
const userStore = ChromeStore.local<UserData>('user_data');
|
|
252
|
+
await userStore.set('email', 'a@b.c');
|
|
253
|
+
const email = await userStore.get('email');
|
|
254
|
+
|
|
255
|
+
// 网页:localStorage / sessionStorage,接口同步
|
|
256
|
+
const prefs = WebStore.local<{ theme: 'light' | 'dark' }>('prefs');
|
|
257
|
+
prefs.set('theme', 'dark');
|
|
258
|
+
|
|
259
|
+
// 内存:不落盘,接口同步
|
|
260
|
+
const cache = MemoryStore.create<{ token: string }>('cache');
|
|
261
|
+
|
|
262
|
+
// 三者都支持
|
|
263
|
+
userStore.onChanged((changes) => { /* ... */ });
|
|
264
|
+
await userStore.setMultiple({ email: 'x@y.z', loginAt: Date.now() });
|
|
265
|
+
await userStore.remove('email');
|
|
266
|
+
await userStore.clear();
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### 消息总线
|
|
270
|
+
|
|
271
|
+
在 background、content script、popup 之间做类型安全的通信。先定义协议表,`send` / `on` 的 payload 和 response 类型会自动推导:
|
|
272
|
+
|
|
273
|
+
```typescript
|
|
274
|
+
import { createMessageBus } from '@i.un/libs';
|
|
275
|
+
|
|
276
|
+
type AppMessages = {
|
|
277
|
+
'user/get': { payload: void; response: { id: string; name: string } };
|
|
278
|
+
'tab/highlight': { payload: { selector: string }; response: boolean };
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
const bus = createMessageBus<AppMessages>();
|
|
282
|
+
|
|
283
|
+
// background 里注册处理器(返回取消函数)
|
|
284
|
+
const off = bus.on('user/get', async (_payload, sender) => {
|
|
285
|
+
return { id: '1', name: 'nova' };
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
// content script 里发送到 background
|
|
289
|
+
const user = await bus.send('user/get');
|
|
290
|
+
|
|
291
|
+
// 发送到指定 tab
|
|
292
|
+
const ok = await bus.sendToTab(tabId, 'tab/highlight', { selector: '.card' });
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
### Cookie 读取
|
|
296
|
+
|
|
297
|
+
只能在扩展后台(service worker / background)或有 `cookies` 权限的扩展页面里调用:
|
|
298
|
+
|
|
299
|
+
```typescript
|
|
300
|
+
import { getCookie, getCookies } from '@i.un/libs';
|
|
301
|
+
|
|
302
|
+
const token = await getCookie('https://example.com', 'session', true); // 只要值
|
|
303
|
+
const cookie = await getCookie('https://example.com', 'session'); // 完整 Cookie 对象
|
|
304
|
+
|
|
305
|
+
const header = await getCookies('https://example.com', true); // "a=1; b=2" 形式
|
|
306
|
+
const list = await getCookies('https://example.com'); // Cookie 数组
|
|
307
|
+
```
|
|
308
|
+
|
|
105
309
|
### DOM 元素创建
|
|
106
310
|
|
|
107
311
|
```typescript
|
|
@@ -204,7 +408,7 @@ cloned.items.push(4); // 不会影响原对象
|
|
|
204
408
|
```typescript
|
|
205
409
|
import { scrollToBottom, scrollToBottomIfNeeded } from '@i.un/libs';
|
|
206
410
|
|
|
207
|
-
const chatContainer = document.getElementById('chat')
|
|
411
|
+
const chatContainer = document.getElementById('chat')!;
|
|
208
412
|
|
|
209
413
|
// 强制滚动到底部
|
|
210
414
|
scrollToBottom(chatContainer);
|
|
@@ -3,7 +3,7 @@ import { AsyncFunction, RealUndefined } from "./type";
|
|
|
3
3
|
* 定义一个类型,用于扩展函数类型,增加一个可选的 isExecuting 属性
|
|
4
4
|
*/
|
|
5
5
|
export type SingleExecutionFunction<F extends AsyncFunction<any[], any>> = F extends (this: infer This, ...args: infer Args) => Promise<infer R> ? ((this: This, ...args: Args) => Promise<R | RealUndefined>) & {
|
|
6
|
-
isExecuting
|
|
6
|
+
isExecuting: boolean;
|
|
7
7
|
} : never;
|
|
8
8
|
/**
|
|
9
9
|
* 创建一个有执行状态的函数,该函数在前一次调用未完成时不会被再次调用。
|
|
@@ -38,6 +38,4 @@ export type SingleExecutionFunction<F extends AsyncFunction<any[], any>> = F ext
|
|
|
38
38
|
* `isExecuting` 会保持到满足时长为止。默认 0,即结束即释放。
|
|
39
39
|
* @returns 一个增强版的函数,该函数具有 isExecuting 属性。
|
|
40
40
|
*/
|
|
41
|
-
export declare function singleExecutionWrapper<T extends AsyncFunction<any[], any>>(func: T, minTime?: number): T
|
|
42
|
-
isExecuting: boolean;
|
|
43
|
-
};
|
|
41
|
+
export declare function singleExecutionWrapper<T extends AsyncFunction<any[], any>>(func: T, minTime?: number): SingleExecutionFunction<T>;
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e=Symbol("undefined");function t(e){return"function"==typeof(null==e?void 0:e.clone)}function n(e){var t=typeof e;return null===e||"string"===t||"number"===t||"boolean"===t||"undefined"===t}function i(e){return n(e)?String(e):JSON.stringify(e,function(e,t){return"object"!=typeof t||null===t||Array.isArray(t)?t:Object.keys(t).sort().reduce(function(e,n){return e[n]=t[n],e},{})})}function r(e){if(null===e||"object"!=typeof e)return e;if(t(e))return e.clone();if(Array.isArray(e))return e.map(function(e){return r(e)});var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=r(e[i]));return n}function o(e){return new Proxy({},{get:function(t,n){return t.hasOwnProperty(n)?t[n]:e}})}function a(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var r=0,o=n;r<o.length;r++){var l=o[r];if(!i.includes(l)||!a(e[l],t[l]))return!1}return!0}var l=o(e),s=o(!1);function c(e){return l[e]}function u(t){return l[t]!==e}var d={timeout:6e4,timeoutResult:{code:408,msg:"请求超时"},identifier:""};function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function m(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,g(i.key),i)}}function p(e,t,n){return t&&m(e.prototype,t),n&&m(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return h(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},v.apply(null,arguments)}function g(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}var y=function(){},b=/*#__PURE__*/function(){function e(){this.tail=Promise.resolve(),this.running=0}return e.prototype.run=function(e){var t=this;this.running++;var n=this.tail.then(e,e),i=function(){t.running--};return this.tail=n.then(i,i),n},p(e,[{key:"size",get:function(){return this.running}},{key:"idle",get:function(){return 0===this.running}}])}(),k=/*#__PURE__*/function(){function e(){this.locks=new Map}return e.prototype.run=function(e,t){var n=this,i=this.locks.get(e);i||(i=new b,this.locks.set(e,i));var r=i,o=r.run(t);return o.then(y,y).then(function(){r.idle&&n.locks.get(e)===r&&n.locks.delete(e)}),o},p(e,[{key:"size",get:function(){return this.locks.size}}])}();function w(e,t,n){if(!e.s){if(n instanceof C){if(!n.s)return void(n.o=w.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(w.bind(null,e,t),w.bind(null,e,2));e.s=t,e.v=n;const i=e.o;i&&i(e)}}var C=/*#__PURE__*/function(){function e(){}return e.prototype.then=function(t,n){var i=new e,r=this.s;if(r){var o=1&r?t:n;if(o){try{w(i,1,o(this.v))}catch(e){w(i,2,e)}return i}return this}return this.o=function(e){try{var r=e.v;1&e.s?w(i,1,t?t(r):r):n?w(i,1,n(r)):w(i,2,r)}catch(e){w(i,2,e)}},i},e}();function P(e){return e instanceof C&&1&e.s}var x=/*#__PURE__*/function(){function e(e){this.storageKey=void 0,this.data={},this.listeners=[],this.storageKey=e}e.getInstanceKey=function(e){return"memory:"+e},e.getInstance=function(t){var n=this.getInstanceKey(t);return this.instances.has(n)||this.instances.set(n,new e(t)),this.instances.get(n)},e.create=function(e){return this.getInstance(e)},e.clearInstance=function(e){var t=this.getInstanceKey(e),n=this.instances.get(t);n&&n.clearChangeCallbacks(),this.instances.delete(t)},e.clearAllInstances=function(){this.instances.forEach(function(e){e.clearChangeCallbacks()}),this.instances.clear()};var t=e.prototype;return t.set=function(e,t){try{var n,i=v({},this.data);this.data=v({},this.data,((n={})[e]=t,n)),this.triggerChange(i,this.data)}catch(e){throw console.error("MemoryStore.set 失败:",e),e}},t.get=function(e){try{return this.data[e]}catch(e){throw console.error("MemoryStore.get 失败:",e),e}},t.getAll=function(){return v({},this.data)},t.remove=function(e){try{if(e in this.data){var t=v({},this.data),n=v({},this.data);delete n[e],this.data=n,this.triggerChange(t,this.data)}}catch(e){throw console.error("MemoryStore.remove 失败:",e),e}},t.clear=function(){try{var e=v({},this.data);this.data={},this.triggerChange(e,this.data)}catch(e){throw console.error("MemoryStore.clear 失败:",e),e}},t.setMultiple=function(e){try{var t=v({},this.data);this.data=v({},this.data,e),this.triggerChange(t,this.data)}catch(e){throw console.error("MemoryStore.setMultiple 失败:",e),e}},t.onChanged=function(e,t){this.listeners.push({prop:"string"==typeof e?e:void 0,callback:"string"==typeof e?t:e})},t.offChanged=function(e,t){var n="string"==typeof e?e:void 0,i="string"==typeof e?t:e;this.listeners=this.listeners.filter(function(e){return!(e.prop===n&&e.callback===i)})},t.triggerChange=function(e,t){this.listeners.length>0&&this.listeners.forEach(function(n){var i=n.prop,r=n.callback;try{if(i)a(t[i],e[i])||r(t[i],e[i]);else{var o={};new Set([].concat(Object.keys(t),Object.keys(e))).forEach(function(n){var i=n;a(t[i],e[i])||(o[i]={newValue:t[i],oldValue:e[i]})}),Object.keys(o).length>0&&r(o)}}catch(e){console.error("MemoryStore 变化回调执行失败:",e)}})},t.clearChangeCallbacks=function(){this.listeners=[]},t.has=function(e){try{return e in this.data}catch(e){return console.error("MemoryStore.has 失败:",e),!1}},t.getSize=function(){try{var e=JSON.stringify(this.data);return new Blob([e]).size}catch(e){return console.error("MemoryStore.getSize 失败:",e),0}},t.getStoreKey=function(){return this.storageKey},t.getStoreType=function(){return"memory"},e}();function S(e,t,n,i){if(void 0===i&&(i=!1),t in e.style)e.style[t]=n;else{var r=i?"important":"";e.style.setProperty(t,String(n),r)}}function L(e){var t=document.createElementNS("http://www.w3.org/2000/svg",e.type);if(e.props)for(var n=0,i=Object.entries(e.props);n<i.length;n++){var r=i[n];t.setAttribute(r[0],r[1])}if("string"==typeof e.children){var o=document.createTextNode(e.children);t.appendChild(o)}else Array.isArray(e.children)&&e.children.forEach(function(e){var n=L(e);t.appendChild(n)});return t}function I(e){var t=(new DOMParser).parseFromString(e,"image/svg+xml").documentElement;if(!(t instanceof SVGElement))throw new Error("解析失败,结果不是有效的 SVG 元素");return t}function E(e){e&&setTimeout(function(){e.scrollTop=e.scrollHeight},0)}x.instances=new Map;var _=/*#__PURE__*/function(){function e(e,t){void 0===t&&(t={}),this.element=void 0,this.options=void 0,this.isDragging=!1,this.startX=0,this.startY=0,this.initialX=0,this.initialY=0,this.threshold=5,this.onMouseMoveHandler=void 0,this.onMouseUpHandler=void 0,this.element=e,this.options=v({coordinate:"tl"},t);var n=getComputedStyle(this.element).position;n&&"static"!==n||(this.element.style.position="absolute"),this.options.position&&(this.element.style.position=this.options.position),this.onMouseMoveHandler=this.onMouseMove.bind(this),this.onMouseUpHandler=this.onMouseUp.bind(this),this.element.addEventListener("mousedown",this.onMouseDown.bind(this))}var t=e.prototype;return t.onMouseDown=function(e){e.preventDefault(),this.startX=e.clientX,this.startY=e.clientY,this.initialX=parseInt(window.getComputedStyle(this.element).left,10)||0,this.initialY=parseInt(window.getComputedStyle(this.element).top,10)||0,document.addEventListener("mousemove",this.onMouseMoveHandler),document.addEventListener("mouseup",this.onMouseUpHandler)},t.getBoundedPosition=function(e,t){var n,i,r=this.element.getBoundingClientRect();if("fixed"===getComputedStyle(this.element).position)n=window.innerWidth-r.width,i=window.innerHeight-r.height;else{var o=(this.element.offsetParent||document.documentElement).getBoundingClientRect();n=o.width-r.width,i=o.height-r.height}return{x:Math.min(Math.max(0,e),n),y:Math.min(Math.max(0,t),i)}},t.onMouseMove=function(e){if(!this.isDragging){var t=e.clientY-this.startY;(Math.abs(e.clientX-this.startX)>this.threshold||Math.abs(t)>this.threshold)&&(this.isDragging=!0,this.options.onDragStart&&this.options.onDragStart(e))}if(this.isDragging){var n=this.getBoundedPosition(this.initialX+(e.clientX-this.startX),this.initialY+(e.clientY-this.startY));this.element.style.right="auto",this.element.style.bottom="auto",this.element.style.left=n.x+"px",this.element.style.top=n.y+"px",this.options.onDrag&&this.options.onDrag(e)}},t.convertCoordinate=function(){var e=this.element.getBoundingClientRect(),t=getComputedStyle(this.element).position,n=null,i=null;if("fixed"===t?(n=null,i=new DOMRect(0,0,window.innerWidth,window.innerHeight)):((n=this.element.offsetParent)||(n=document.documentElement),"static"===getComputedStyle(n).position?(n=null,i=new DOMRect(0,0,window.innerWidth,window.innerHeight)):i=n.getBoundingClientRect()),i){var r,o;if("fixed"===t)r=e.left,o=e.top;else if(r=e.left-i.left,o=e.top-i.top,n instanceof HTMLElement){var a=getComputedStyle(n);r-=parseFloat(a.borderLeftWidth)||0,o-=parseFloat(a.borderTopWidth)||0}else r+=window.scrollX,o+=window.scrollY;switch(this.options.coordinate){case"tr":var l=i.width-r-e.width;this.element.style.left="auto",this.element.style.right=l+"px",this.element.style.top=o+"px",this.element.style.bottom="auto";break;case"bl":var s=i.height-o-e.height;this.element.style.left=r+"px",this.element.style.right="auto",this.element.style.top="auto",this.element.style.bottom=s+"px";break;case"br":var c=i.width-r-e.width,u=i.height-o-e.height;this.element.style.left="auto",this.element.style.right=c+"px",this.element.style.top="auto",this.element.style.bottom=u+"px";break;default:this.element.style.left=r+"px",this.element.style.right="auto",this.element.style.top=o+"px",this.element.style.bottom="auto"}}},t.onMouseUp=function(e){this.isDragging&&(this.options.coordinate&&"tl"!==this.options.coordinate&&this.convertCoordinate(),this.options.onDragEnd&&this.options.onDragEnd(e)),this.isDragging=!1,document.removeEventListener("mousemove",this.onMouseMoveHandler),document.removeEventListener("mouseup",this.onMouseUpHandler)},e}(),O=/*#__PURE__*/function(){function e(e,t){void 0===t&&(t="local"),this.storageKey=void 0,this.storeType=void 0,this.store=void 0,this.listeners=[],this.storageKey=e,this.storeType=t}e.getInstanceKey=function(e,t){return void 0===t&&(t="local"),t+":"+e},e.getInstance=function(t,n){void 0===n&&(n="local");var i=this.getInstanceKey(t,n);return this.instances.has(i)||this.instances.set(i,new e(t,n)),this.instances.get(i)},e.local=function(e){return this.getInstance(e,"local")},e.session=function(e){return this.getInstance(e,"session")},e.clearInstance=function(e,t){void 0===t&&(t="local");var n=this.getInstanceKey(e,t);this.instances.delete(n)},e.clearAllInstances=function(){this.instances.clear()};var t=e.prototype;return t.getStore=function(){return this.store||(this.store="local"===this.storeType?localStorage:sessionStorage),this.store},t.set=function(e,t){try{var n,i=v({},this.getAll(),((n={})[e]=t,n));this.getStore().setItem(this.storageKey,JSON.stringify(i))}catch(e){throw console.error("WebStore.set 失败:",e),e}},t.get=function(e){try{var t=this.getAll();return null==t?void 0:t[e]}catch(e){throw console.error("WebStore.get 失败:",e),e}},t.getAll=function(){try{var e=this.getStore().getItem(this.storageKey);return e?JSON.parse(e):{}}catch(e){return console.error("WebStore.getAll 失败:",e),{}}},t.remove=function(e){try{var t=this.getAll();t&&e in t&&(delete t[e],this.getStore().setItem(this.storageKey,JSON.stringify(t)))}catch(e){throw console.error("WebStore.remove 失败:",e),e}},t.clear=function(){try{this.getStore().removeItem(this.storageKey)}catch(e){throw console.error("WebStore.clear 失败:",e),e}},t.setMultiple=function(e){try{var t=v({},this.getAll(),e);this.getStore().setItem(this.storageKey,JSON.stringify(t))}catch(e){throw console.error("WebStore.setMultiple 失败:",e),e}},e.setupGlobalListener=function(){var e=this;this.isGlobalListenerInitialized||(this.isGlobalListenerInitialized=!0,window.addEventListener("storage",function(t){e.instances.forEach(function(e){if(t.key===e.storageKey&&t.storageArea===e.getStore()){var n=t.oldValue?JSON.parse(t.oldValue):{},i=t.newValue?JSON.parse(t.newValue):{};e.dispatchChange(i,n)}})}))},t.dispatchChange=function(e,t){var n=e||{},i=t||{};this.listeners.forEach(function(e){var t=e.prop,r=e.callback;if(t)a(n[t],i[t])||r(n[t],i[t]);else{var o={};new Set([].concat(Object.keys(n),Object.keys(i))).forEach(function(e){var t=e;a(n[t],i[t])||(o[t]={newValue:n[t],oldValue:i[t]})}),Object.keys(o).length>0&&r(o)}})},t.onChanged=function(t,n){e.setupGlobalListener(),this.listeners.push({prop:"string"==typeof t?t:void 0,callback:"string"==typeof t?n:t})},t.offChanged=function(e,t){var n="string"==typeof e?e:void 0,i="string"==typeof e?t:e;this.listeners=this.listeners.filter(function(e){return!(e.prop===n&&e.callback===i)})},t.has=function(e){try{return void 0!==this.get(e)}catch(e){return console.error("WebStore.has 失败:",e),!1}},t.getSize=function(){try{var e=this.getStore().getItem(this.storageKey)||"";return new Blob([e]).size}catch(e){return console.error("WebStore.getSize 失败:",e),0}},t.getStoreKey=function(){return this.storageKey},e}();function j(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}O.instances=new Map,O.isGlobalListenerInitialized=!1;var T=/*#__PURE__*/function(){function e(e,t){void 0===t&&(t="local"),this.storageKey=void 0,this.storeType=void 0,this.store=void 0,this.listeners=[],this.storageKey=e,this.storeType=t}e.getInstanceKey=function(e,t){return void 0===t&&(t="local"),t+":"+e},e.getInstance=function(t,n){void 0===n&&(n="local");var i=this.getInstanceKey(t,n);return this.instances.has(i)||this.instances.set(i,new e(t,n)),this.instances.get(i)},e.local=function(e){return this.getInstance(e,"local")},e.sync=function(e){return this.getInstance(e,"sync")},e.clearInstance=function(e,t){void 0===t&&(t="local");var n=this.getInstanceKey(e,t);this.instances.delete(n)},e.clearAllInstances=function(){this.instances.clear()};var t=e.prototype;return t.getStore=function(){return this.store||(this.store=chrome.storage[this.storeType]),this.store},t.set=function(e,t){try{var n=this;return Promise.resolve(j(function(){return Promise.resolve(n.getAll()).then(function(i){var r,o,a=v({},i,((r={})[e]=t,r));return Promise.resolve(n.getStore().set((o={},o[n.storageKey]=a,o))).then(function(){})})},function(e){throw console.error("ChromeStore.set 失败:",e),e}))}catch(e){return Promise.reject(e)}},t.get=function(e){try{var t=this;return Promise.resolve(j(function(){return Promise.resolve(t.getAll()).then(function(t){return null==t?void 0:t[e]})},function(e){throw console.error("ChromeStore.get 失败:",e),e}))}catch(e){return Promise.reject(e)}},t.getAll=function(){try{var e=this;return Promise.resolve(j(function(){return Promise.resolve(e.getStore().get(e.storageKey)).then(function(t){return t[e.storageKey]||{}})},function(e){throw console.error("ChromeStore.getAll 失败:",e),e}))}catch(e){return Promise.reject(e)}},t.remove=function(e){try{var t=this;return Promise.resolve(j(function(){return Promise.resolve(t.getAll()).then(function(n){var i=function(){var i;if(n&&e in n)return delete n[e],Promise.resolve(t.getStore().set((i={},i[t.storageKey]=n,i))).then(function(){})}();if(i&&i.then)return i.then(function(){})})},function(e){throw console.error("ChromeStore.remove 失败:",e),e}))}catch(e){return Promise.reject(e)}},t.clear=function(){try{var e=this;return Promise.resolve(j(function(){return Promise.resolve(e.getStore().remove(e.storageKey)).then(function(){})},function(e){throw console.error("ChromeStore.clear 失败:",e),e}))}catch(e){return Promise.reject(e)}},t.setMultiple=function(e){try{var t=this;return Promise.resolve(j(function(){return Promise.resolve(t.getAll()).then(function(n){var i,r=v({},n,e);return Promise.resolve(t.getStore().set((i={},i[t.storageKey]=r,i))).then(function(){})})},function(e){throw console.error("ChromeStore.setMultiple 失败:",e),e}))}catch(e){return Promise.reject(e)}},e.setupGlobalListener=function(){var e=this;this.isGlobalListenerInitialized||(this.isGlobalListenerInitialized=!0,chrome.storage.onChanged.addListener(function(t,n){e.instances.forEach(function(e){if(e.storeType===n&&t[e.storageKey]){var i=t[e.storageKey];e.dispatchChange(i.newValue,i.oldValue)}})}))},t.dispatchChange=function(e,t){var n=e||{},i=t||{};this.listeners.forEach(function(e){var t=e.prop,r=e.callback;if(t)a(n[t],i[t])||r(n[t],i[t]);else{var o={};new Set([].concat(Object.keys(n),Object.keys(i))).forEach(function(e){var t=e;a(n[t],i[t])||(o[t]={newValue:n[t],oldValue:i[t]})}),Object.keys(o).length>0&&r(o)}})},t.onChanged=function(t,n){e.setupGlobalListener(),this.listeners.push({prop:"string"==typeof t?t:void 0,callback:"string"==typeof t?n:t})},t.offChanged=function(e,t){var n="string"==typeof e?e:void 0,i="string"==typeof e?t:e;this.listeners=this.listeners.filter(function(e){return!(e.prop===n&&e.callback===i)})},t.has=function(e){try{var t=this;return Promise.resolve(j(function(){return Promise.resolve(t.get(e)).then(function(e){return void 0!==e})},function(e){return console.error("ChromeStore.has 失败:",e),!1}))}catch(e){return Promise.reject(e)}},t.getSize=function(){try{var e=this;return Promise.resolve(j(function(){return Promise.resolve(e.getAll()).then(function(e){var t=JSON.stringify(e);return new Blob([t]).size})},function(e){return console.error("ChromeStore.getSize 失败:",e),0}))}catch(e){return Promise.reject(e)}},t.getStoreKey=function(){return this.storageKey},e}();T.instances=new Map,T.isGlobalListenerInitialized=!1;var A="https://www.linkedin.com/voyager/api";function N(e,t){var n,i={"csrf-token":e};return t&&(n="string"==typeof t?t:Object.entries(t).map(function(e){return e[0]+"="+e[1]}).join("; "))&&(i.Cookie=n),i}var M={profilePage:{userPicture:[".pv-top-card__non-self-photo-wrapper img","#recent-activity-top-card img",".pv-top-card__photo-wrapper img",'div[componentkey^="com.linkedin.sdui.profile.card"] div[data-view-name="profile-top-card-member-photo"] img'],userName:['a[href^="/in"] h1',"#recent-activity-top-card h3",'div[data-view-name="profile-top-card-verified-badge"] div[role="button"]','a[href^="https://www.linkedin.com/in"] h2','div[componentKey$="Topcard"] a[href^="https://www.linkedin.com"] h2','div[componentkey$="Topcard"] h2'],userOccupation:[".artdeco-entity-lockup .artdeco-entity-lockup__subtitle","#recent-activity-top-card h4"],lemlistProfileCardLeadName:[".lemlist-profile-card .lead-name"],linkedinProfileCard:[".scaffold-layout__main .artdeco-card:first-child","main .artdeco-card:first-child:not(.lemlist-header)",'div[componentkey^="com.linkedin.sdui.profile.card"]'],lemlistProfileCard:[".lemlist-profile-card"],alreadyInLemlistTag:[".lemlist-profile-card .already-in-lemlist"],notInLemlistTag:[".lemlist-profile-card .not-in-lemlist"],findEmailTag:[".lemlist-profile-card .find-email"],findPhoneTag:[".lemlist-profile-card .find-phone"],lemlistEmailFound:[".lemlist-profile-card .lemlist-email-found"],privateProfileInfoSection:[".pv-profile-info-section"],howToContainer:["#profile-content, header#global-nav"],companyName:[".top-card-background-hero-image+div .mt2 ul>li span",'div[componentkey^="com.linkedin.sdui.profile.card"] div:has(div[data-view-name="profile-top-card-verified-badge"]) + div div[role="button"] p'],companyLogo:[".top-card-background-hero-image+div .mt2 ul>li img"],howToTippyContainer:["#lemlist-sidebar .sidebar"],lemlistListContainer:[".ui-row.lemlist-list-container"],campaignsListContainer:[".ui-row.sm.campaigns-list-container"],contactListContainer:[".ui-row.sm.contact-list-container"],addButtonText:[".lemlist-add-button-text"],location:["#profile-content .artdeco-card .top-card-background-hero-image+div .text-body-small.inline.t-black--light"],campaignsListContainerDisplay:[".ui-col.sm.campaigns-list-container-display"],contactListContainerDisplay:[".ui-col.sm.contact-list-container-display"],notInLemlistButton:[".lemlist-profile-card .action-primary.not-in-lemlist"],alreadyInLemlistButton:[".lemlist-profile-card .action-primary.already-in-lemlist"],mainExperienceContainer:[".artdeco-card:has(#experience) li:first-child",'div[componentkey^="com.linkedin.sdui.profile.card"][componentkey$="ExperienceTopLevelSection"] div:has(h2) + div > div'],experienceCompanyLogo:['[data-field="experience_company_logo"] img','div[componentkey^="com.linkedin.sdui.profile.card"][componentkey$="ExperienceTopLevelSection"] div:has(h2) + div figure[data-view-name="image"] img'],experienceCompanyName:['div:has([data-field="experience_company_logo"])+div .t-normal span:not(.visually-hidden)'],experienceOccupation:['div:has([data-field="experience_company_logo"])+div .t-bold span:not(.visually-hidden)'],experienceMultipleCompany:["li:has([data-view-name=profile-component-entity] .pvs-entity__sub-components .pvs-entity__sub-components) .t-bold span:not(.visually-hidden)"],experienceMultipleOccupation:['[data-view-name="profile-component-entity"] li:first-child .t-bold span:not(.visually-hidden)'],memberId:["[data-member-id]"],lemlistHowToOverlay:[".lemlist-how-to-overlay"]},salesNavListsPeoplePage:{fullName:['[data-anonymize="person-name"]'],userOccupation:['[data-anonymize="job-title"]'],companyName:['[data-anonymize="company-name"]'],userPicture:['img[data-anonymize="headshot-photo"]'],linkedinUrl:['a[href^="/sales/lead/"]'],lemlistAlreadyInCampaign:[".lemlist-already-in-campaign"],lastCell:["td:last-child"],lastHeader:["th:last-child"],linkedinCheckbox:['.artdeco-list__item input[type="checkbox"]'],linkedinCheckbox2:['[data-scroll-into-view] input[type="checkbox"]'],linkedinCheckbox3:['table input[type="checkbox"]'],linkedinCheckbox3Checked:['table input[type="checkbox"]'],linkedinCheckboxSelectAll:['input[id="bulk-actions-select"]'],bulkToolbar:['.list-detail div:has(input[type="checkbox"])'],mainContainer:["#content-main"],lemlistTableHeader:["th.lemlist-already-in-campaign"],profileSideContainer:["#inline-sidesheet-outlet"],checkboxContainer:["tr"],paginationControls:[".artdeco-pagination"]},salesNavProfilePage:{profileCardSection:["#profile-card-section"],userName:['#profile-card-section [data-anonymize="person-name"]','h1[data-anonymize="person-name"]'],userPicture:['#profile-card-section img[data-anonymize="headshot-photo"]'],userOccupation:['#profile-card-section [data-anonymize="headline"]'],profileUrl:['#profile-card-section a[href^="/sales/lead"]'],linkedinProfileCard:["#profile-card-section"],lemlistProfileCard:[".lemlist-profile-card"],findEmailTag:[".lemlist-profile-card .find-email"],findPhoneTag:[".lemlist-profile-card .find-phone"],lemlistEmailFound:[".lemlist-profile-card .lemlist-email-found"],alreadyInLemlistTag:[".lemlist-profile-card .already-in-lemlist"],notInLemlistTag:[".lemlist-profile-card .not-in-lemlist"],lemlistListContainer:[".ui-row.lemlist-list-container"],campaignsListContainer:[".ui-row.sm.campaigns-list-container"],contactListContainer:[".ui-row.sm.contact-list-container"],addButtonText:[".lemlist-add-button-text"],campaignsListContainerDisplay:[".ui-col.sm.campaigns-list-container-display"],contactListContainerDisplay:[".ui-col.sm.contact-list-container-display"],notInLemlistButton:[".lemlist-profile-card .action-primary.not-in-lemlist"],alreadyInLemlistButton:[".lemlist-profile-card .action-primary.already-in-lemlist"],location:["#profile-card-section>section>div>div:last-child div:has(svg)"],companyName:['#profile-card-section a[data-anonymize="company-name"]'],companyLogo:['#profile-card-section img[data-anonymize="company-logo"]'],moreInfoButton:["#profile-card-section section[data-x--lead-actions-bar] button[data-x--lead-actions-bar-overflow-menu]",'#profile-card-section button[aria-label="Open actions overflow menu"]'],linkedinProfileLinkButton:['#hue-web-menu-outlet a[href^="https://www.linkedin.com/in/"]'],mainExperienceContainer:['[data-sn-view-name="feature-lead-experience"]'],experienceCompanyLogo:['li:first-child img[data-anonymize="company-logo"]'],experienceCompanyName:['li:first-child [data-anonymize="company-name"]'],experienceOccupation:['li:first-child [data-anonymize="job-title"]'],experienceMultipleOccupation:['ul li ul li:first-child [data-anonymize="job-title"]','ul li [data-anonymize="job-title"]'],experienceMultipleCompany:['li:first-child [data-anonymize="company-name"]']},salesNavSearchPeoplePage:{linkedinUrl:['a[href^="/sales/lead/"]'],fullName:['[data-anonymize="person-name"]'],userOccupation:['[data-anonymize="title"]'],companyName:['a[data-anonymize="company-name"]'],userPicture:['img[data-anonymize="headshot-photo"]'],actionsDiv:["ul:has(li [data-anchor-send-message])"],linkedinCheckbox:['.artdeco-list__item input[type="checkbox"]'],linkedinCheckboxChecked:['.artdeco-list__item input[type="checkbox"]:checked'],linkedinCheckbox2:['[data-scroll-into-view] input[type="checkbox"]'],linkedinCheckboxSelectAll:['input[id^="multi-selector-checkbox-ember"]','li input#bulk-actions-select[type="checkbox"]'],lemlistAlreadyInCampaignTagContainer:[".artdeco-list__item ul:has(li [data-anchor-send-message])"],lemlistHeaderContainer:["div:has(+ #search-results-container)"],entityLockup:[".artdeco-entity-lockup"],listItem:[".artdeco-list__item"],checkbox:['input[type="checkbox"]'],listItemArticle:[".artdeco-list__item article"],dataScrollIntoView:["[data-scroll-into-view]"],leadSearchResults:['[data-sn-view-name="module-lead-search-results"]'],completeCheckboxes:['[data-scroll-into-view]:has(+:not(:is(article))) input[type="checkbox"]'],incompleteCheckboxes:['[data-scroll-into-view]:has(+article) input[type="checkbox"]'],profileSideContainer:["#inline-sidesheet-outlet"],linkedinSearchPageContainer:[".lemlist-header + #search-results-container"],howToContainer:["header.application-header"],howToScrollToElement:[".lemlist-header"],selectAllCheckbox:[".lemlist-checkbox-all"],selectAllCheckboxLabel:["span.lemlist-select-all-text"],selectCheckboxChecked:[".lemlist-checkbox:not(.lemlist-checkbox-all).checked"],paginationControls:[".artdeco-pagination"]},searchPeoplePage:{searchEntityResult:['[data-view-name="search-entity-result-universal-template"]'],linkedinUrl:['a[data-test-app-aware-link][href^="https://www.linkedin.com/in/"]','a[data-view-name="search-result-lockup-title"]','a[href^="https://www.linkedin.com/in/"]'],image:["a>div>div>figure>img, a>div>div>figure>svg, .presence-entity img"],userOccupation:['p:has(a[data-view-name="search-result-lockup-title"]) + p',".entity-result__primary-subtitle",".entity-result__divider > div div:nth-child(2)","div>div>div:nth-child(2)>div>div:nth-child(2)","figure + div p:nth-child(2)"],fullName:[".entity-result__title-text a span>span",".entity-result__title-line a span>span",".entity-result__title-line span>a>span>span","a:has(+.entity-result__badge)>span>span",".linked-area div:nth-child(2) > div:first-child > div.t-roman.t-sans a",'a[data-view-name="search-result-lockup-title"]','p a[href^="https://www.linkedin.com/in/"]'],resultList:[".search-results-container>div:has(.reusable-search__result-container)"],actionsDiv:[".entity-result__actions",".linked-area > div > div:last-child",'div:has(>div[data-view-name="relationship-building-button"])',"div:has(>figure) > div:last-child"],validResult:["[data-chameleon-result-urn] , .reusable-search__result-container"],searchResult:[".search-results-container li:has(>[data-chameleon-result-urn])",'[data-view-name="people-search-result"]','[data-sdui-screen="com.linkedin.sdui.flagshipnav.search.SearchResultsPeople"] [role="list"] [role="listitem"] > div[data-display-contents="true"]:has(a[href^="https://www.linkedin.com/in/"])'],searchResultsContainer:[".search-results-container",'[role="main"] div:has(>hr[role="presentation"])','[data-sdui-screen="com.linkedin.sdui.flagshipnav.search.SearchResultsPeople"] [data-testid="lazy-column"]','[data-sdui-screen="com.linkedin.sdui.flagshipnav.search.SearchResultsPeople"] [role="list"]'],searchResultsContainerParent:['div[componentkey="SemanticPeopleSearchResultsPEOPLE_SEARCH"]','[data-sdui-screen="com.linkedin.sdui.flagshipnav.search.SearchResultsPeople"] [data-testid="lazy-column"]'],searchResultsContainerRemovedParent:['div[data-sdui-component="com.linkedin.sdui.generated.search.dsl.impl.spsInvokePserpAfterReasoning"]'],mainLayoutLeft:[".search-marvel-srp",'[role="main"] div:has(hr)>div>div','[data-sdui-screen="com.linkedin.sdui.flagshipnav.search.SearchResultsPeople"] section'],howToContainer:[".hasLegacyFeedLineHeight div:has(main)",".authentication-outlet"],howToScrollToElement:[".lemlist-header"],selectAllCheckbox:[".lemlist-checkbox-all"],selectAllCheckboxLabel:["span.lemlist-select-all-text"],selectCheckboxChecked:[".lemlist-checkbox:not(.lemlist-checkbox-all).checked"],paginationControls:['[data-testid="pagination-controls-list"]',".artdeco-pagination"],peopleButton:['div[data-view-name="search-filters"] label',"nav ul.search-reusables__filter-list>li>button",'[componentkey="SearchResults_SearchResultsFilterBar"] label']},searchAllPage:{peopleButton:['div[data-view-name="search-filters"] label',"nav ul.search-reusables__filter-list>li>button",'[componentkey="SearchResults_SearchResultsFilterBar"] label'],toolbar:[".scaffold-layout-toolbar"]},linkedinComposerPage:{composerWrapper:[".msg-convo-wrapper"],textareaSelector:[".msg-form__contenteditable"],footer:[".msg-form__message-texteditor"],messagingOverlay:["#msg-overlay"],form:[".msg-form"],formContainer:["form.msg-form.msg-form--thread-footer-feature"],composerEvent:[".msg-s-event-listitem"],composerEventBody:[".msg-s-event-listitem__body"],composerEventName:[".msg-s-message-group__name"],composerEventDate:[".msg-s-message-group__timestamp"],interOPOutlet:["#interop-outlet"]},hubspot:{tableExternalId:["[data-table-external-id]"],avatarDisplay:['[data-test-id="AvatarDisplay-switchComponent"]'],flexContainer:['[class*="Flex__StyledFlex"]'],frameworkDataTable:['[data-test-id="framework-data-table"]'],companyAssocCard:['[data-card-type="ASSOCIATION_TABLE"]'],avatarContainerClass:["AvatarContainer__AvatarWrapper-"],privateButtonClasses:["PrivateButton__StyledButton-eRHhiA","jzJlvZ"],leadRowCell:['[data-table-external-id^="cell-0-136-"]'],leadPrimaryContactLink:['[data-test-id^="association-link-0-1-"]'],leadPrimaryContactHeader:['[data-table-external-id="header-0-136-associations.0-578"]']},gmail:{userEmailElm:[".gb_A.gb_Xa.gb_Z"],userEmailElmFallback:[".gb_Bc .gb_g + div"]},gmailComposerPage:{gmailComposerForm:["form input[name=composeid]"],gmailComposer:["div.M9"],previousMessagesButton:[".ajR"],previousMessages:[".gmail_quote_container blockquote"],lemlistActionBar:[".gmail-action-bar"],lemlistActionBarAskAIElements:[".gmail-ask-ai-elements"],lemlistActionBarTemplatesButton:[".gmail-action-bar .templates"],previousEmail:['form > input[name="rm"]'],body:[".editable.LW-avf"]},gmailSidebarPage:{appIconsContainer:['div[role="tablist"]'],appIconsActiveIcon:["div[role=tablist] div[data-guest-app-id].aT5-aOt-I-KO .aT5-aOt-I-JX-Jw"],appIcons:['div[role="tablist"] div[data-guest-app-id]']},gmailEmailPage:{topBarDate:[".gH.bAk",".gH.VYc0jb"],body:[".a3s.aiL > div[dir]"]}};function R(e,t,n){switch(n){case"all":var i=e.querySelectorAll(t);return i.length>0?Array.from(i):null;case"closest":return e instanceof HTMLElement?e.closest(t):null;default:return e.querySelector(t)}}function U(e){var t=e.page,n=e.key,i=e.container,r=e.mode;null!=i||(i=document);for(var o,a,l=f(t&&n?M[(o={page:t,key:n}).page][o.key]:[e.selector]);!(a=l()).done;){var s=R(i,a.value,r);if(s)return s}return null}function z(e){if(!e)return"";var t=document.createElement("textarea");return t.innerHTML=e,t.value.trim()}function D(){var e,t,n,i,r,o,a,l=window.location.href.includes("linkedin.com/sales")?"salesNavProfilePage":"profilePage";function s(e){return U({page:l,key:e,container:document})}var c=null==(e=s("userName"))?void 0:e.innerText;if(!c)return console.error("extractUserInfos: no userName found"),{};var u,d=null==(t=s("userPicture"))?void 0:t.src,h=null==(n=s("userOccupation"))?void 0:n.innerHTML,m=null==(i=s("companyName"))?void 0:i.innerText,p=null==(r=s("companyLogo"))?void 0:r.src,f=null==(o=s("location"))?void 0:o.innerText;return"salesNavProfilePage"===l&&(u=/linkedin\.com\/sales\/lead/i.test(window.location.href)?window.location.href:null==(a=s("profileUrl"))?void 0:a.href),{name:z(c),profileUrl:u,picture:d,occupation:z(h),companyName:m,companyPicture:p,location:f}}window.getContactInfo=D,window.getElement=U;var B,K,H={"":0,chrome:1,"chrome-extension":2,"view-source":3,ftp:4,file:5,data:6,blob:7,about:8};function W(e){void 0===e&&(e="");var t="",n=e.split("#")[0].toLocaleLowerCase();return/^https\:\/\/(www|.{2})\.linkedin\.com\/in\/[^/?]+(\/recent-activity\/|\/details\/|\/overlay\/|\/?\?[^/]*|\/?$)/.test(n)||/^https\:\/\/(www|.{2})\.linkedin\.com\/sales\/people\/(.+?),/.test(n)||/^https\:\/\/(www|.{2})\.linkedin\.com\/sales\/(profile|lead)\/([^,]{39}),/.test(n)?t="profile":n.includes("linkedin.com/feed")?t="feed":n.includes("linkedin.com/posts/")?t="post":n.includes("linkedin.com/login")||n.includes("linkedin.com/checkpoint")||n.includes("linkedin.com/authwall")?t="login":n.includes("linkedin.com/company/")?t="company":n.includes("linkedin.com/messaging/thread/")?t="messages":n.includes("linkedin.com/search/results/people/?")||n.includes("linkedin.com/sales/search/people")?t="search-people":n.includes("linkedin.com/search/results/all")?t="search-all":n.includes("linkedin.com/mynetwork/")&&(t="connections"),t}function F(e){var t;void 0===e&&(e="");var n=((e=e||(null==(t=window.top)?void 0:t.location.href)||document.URL).match(/linkedin\.com\/in\/([^?/]+)/)||[])[1]||(e.match(/linkedin\.com\/sales\/people\/(.+?),/)||[])[1]||(e.match(/linkedin\.com\/sales\/(?:profile|lead)\/([^,]{39}),/)||[])[1]||"";return decodeURIComponent(n)}function G(e){var t;void 0===e&&(e="");var n=((e=e||(null==(t=window.top)?void 0:t.location.href)||document.URL).match(/linkedin\.com\/company\/([^?/]+)/)||[])[1]||"";return decodeURIComponent(n)}function V(e){if(e){var t=e.match(/:(\d+)$/);return t?t[1]:void 0}}function J(e){if(e){var t=e.match(/,(\d+)\)$/);return t?t[1]:void 0}}function X(e){if(null!=e&&e.year)return{year:e.year,month:e.month}}function Y(e,t,n){if(!e||0===Object.keys(e).length)return n||"";if(t&&e[t])return e[t];var i=Object.keys(e),r=i.find(function(e){return e.startsWith("en")});return r?e[r]:e[i[0]]||n||""}function q(e,t){if(!e||!t)return{};for(var n={},i=0,r=Object.entries(e);i<r.length;i++){var o=r[i],a=o[0],l=o[1];a!==t&&l&&(n[a]=l)}return n}function $(e){return Q(e)}function Q(e){var t,n,i;if(e){var r=(e.rootUrl&&e.artifacts?e:null)||e.vectorImage||(null==(t=e.image)?void 0:t["com.linkedin.common.VectorImage"])||e["com.linkedin.common.VectorImage"]||(null==(n=e.displayImageReference)?void 0:n.vectorImage);if(null!=r&&r.rootUrl&&null!=r&&null!=(i=r.artifacts)&&i.length){var o=r.artifacts,a=o.reduce(function(e,t){return((null==t?void 0:t.width)||0)>((null==e?void 0:e.width)||0)?t:e},o[0]);if(null!=a&&a.fileIdentifyingUrlPathSegment)return r.rootUrl+a.fileIdentifyingUrlPathSegment}}}exports.ContactInfoSource=void 0,(B=exports.ContactInfoSource||(exports.ContactInfoSource={})).PUBLIC="public",B.MANUAL="manual",B.APOLLO="apollo",B.LUSHA="lusha",B.HUNTER="hunter",B.ROCKETREACH="rocketreach",B.SNOV="snov",B.CLEARBIT="clearbit",exports.QueryType=void 0,(K=exports.QueryType||(exports.QueryType={})).EMAIL="email",K.PHONE="phone",K.BOTH="both",exports.ChromeStore=T,exports.Draggable=_,exports.KeyedMutex=k,exports.MemoryStore=x,exports.Mutex=b,exports.RealUndefined=e,exports.WebStore=O,exports.cacheWrapper=function(e,t){void 0===t&&(t=d);var n=function(){var n=[].slice.call(arguments),o=i(n)+e.name+(t.identifier||"");if(u(o))return Promise.resolve(r(c(o)));if(s[o]){var a=Object.assign({},d,t);return new Promise(function(e){var t=Date.now(),n=setInterval(function(){u(o)?(clearInterval(n),e(r(c(o)))):Date.now()-t>a.timeout&&(s[o]=!1,clearInterval(n),e(r(a.timeoutResult)))},100)})}return s[o]=!0,e.apply(this,n).then(function(e){return l[o]=e,r(l[o])}).catch(function(e){throw e}).finally(function(){s[o]=!1})};return Object.defineProperty(n,"name",{value:"cacheWrapper_"+e.name,configurable:!0}),n},exports.cloneDeep=r,exports.coalesce=function(e,t){var n;void 0===t&&(t={});var i=new Map,r=null!=(n=t.key)?n:function(){return""},o=t.onError,a=function(){var t=[].slice.call(arguments),n=r.apply(void 0,t),a=i.get(n);if(a)return a.pending=t,a.hasPending=!0,a.running;var l={running:Promise.resolve(),pending:null,hasPending:!1};return i.set(n,l),l.running=Promise.resolve().then(function(){return function(t,n,r){try{var a=function(){i.delete(t)},l=r,s=function(e,t,n){for(var i;;){var r=e();if(P(r)&&(r=r.v),!r)return o;if(r.then){i=0;break}var o=n();if(o&&o.then){if(!P(o)){i=1;break}o=o.s}}var a=new C,l=w.bind(null,a,2);return(0===i?r.then(c):1===i?o.then(s):(void 0).then(function(){(r=e())?r.then?r.then(c).then(void 0,l):c(r):w(a,1,o)})).then(void 0,l),a;function s(t){o=t;do{if(!(r=e())||P(r)&&!r.v)return void w(a,1,o);if(r.then)return void r.then(c).then(void 0,l);P(o=n())&&(o=o.v)}while(!o||!o.then);o.then(s).then(void 0,l)}function c(e){e?(o=n())&&o.then?o.then(s).then(void 0,l):s(o):w(a,1,o)}}(function(){return!!l},0,function(){function t(){l=n.pending,n.pending=null,n.hasPending=!1}var i=function(t,n){try{var i=Promise.resolve(e.apply(void 0,l)).then(function(){})}catch(e){return n(e)}return i&&i.then?i.then(void 0,n):i}(0,function(e){!function(e,t){if(o)try{o(e,t)}catch(e){}}(e,l)});return i&&i.then?i.then(t):t()});return Promise.resolve(s&&s.then?s.then(a):a())}catch(e){return Promise.reject(e)}}(n,l,t)}),l.running};return a.isRunning=function(){return i.has(r.apply(void 0,[].slice.call(arguments)))},a.hasPending=function(){var e,t;return null!=(e=null==(t=i.get(r.apply(void 0,[].slice.call(arguments))))?void 0:t.hasPending)&&e},Object.defineProperty(a,"size",{get:function(){return i.size}}),a},exports.createDefaultObject=o,exports.createElement=function e(t){var n=void 0===t?{}:t,i=n.tag,r=n.children,o=void 0===r?[]:r,a=n.props,l=void 0===a?{}:a,s=n.attrs,c=void 0===s?{}:s,u=n.styles,d=void 0===u?{}:u,h=document.createElement(void 0===i?"div":i);Object.assign(h,l);for(var m=0,p=Object.entries(c);m<p.length;m++){var v=p[m],g=v[1];!1!==g&&h.setAttribute(v[0],g)}for(var y=0,b=Object.entries(d);y<b.length;y++){var k=b[y];S(h,k[0],k[1])}for(var w,C=f(Array.isArray(o)?o:[o]);!(w=C()).done;){var P=w.value;P&&("object"==typeof P?P instanceof Element?h.appendChild(P):h.appendChild(e(P)):h.appendChild(document.createTextNode(P)))}return h},exports.createMessageBus=function(e){void 0===e&&(e={});var t=e.debug,n=void 0!==t&&t,i=e.logPrefix,r=void 0===i?"[MessageBus]":i,o=new Map,a=!1;function l(e){var t;n&&(t=console).error.apply(t,[r+" "+e].concat([].slice.call(arguments,1)))}function s(){a||(chrome.runtime.onMessage.addListener(function(e,t,n){if(e&&"string"==typeof e.type){var i=o.get(e.type);if(i)try{var r=i(e.payload,t);return r instanceof Promise?(r.then(n).catch(function(t){l('Error handling "'+String(e.type)+'":',t),n({__error:!0,message:t instanceof Error?t.message:String(t)})}),!0):(n(r),!1)}catch(t){return l('Error handling "'+String(e.type)+'":',t),n({__error:!0,message:t instanceof Error?t.message:String(t)}),!1}}}),a=!0)}return{send:function(e){return chrome.runtime.sendMessage({type:e,payload:[].slice.call(arguments,1)[0]})},sendToTab:function(e,t){return chrome.tabs.sendMessage(e,{type:t,payload:[].slice.call(arguments,2)[0]})},on:function(e,t){return s(),o.set(e,t),function(){o.delete(e)}},onMany:function(e){s();for(var t=[],n=0,i=Object.entries(e);n<i.length;n++){var r=i[n],a=r[0],l=r[1];l&&(o.set(a,l),t.push(a))}return function(){for(var e=0,n=t;e<n.length;e++)o.delete(n[e])}},hasHandler:function(e){return o.has(e)},getRegisteredTypes:function(){return Array.from(o.keys())},clearAllHandlers:function(){o.clear()}}},exports.createSvg=function(e){return"string"==typeof e?I(e):L(e)},exports.createSvgFromUrl=function(e){try{return Promise.resolve(function(t,n){try{var i=Promise.resolve(fetch(e)).then(function(e){if(!e.ok)throw new Error("网络请求失败: "+e.status+" "+e.statusText);return Promise.resolve(e.text()).then(I)})}catch(e){return n(e)}return i&&i.then?i.then(void 0,n):i}(0,function(e){var t=e instanceof Error?e.message:"未知错误";throw new Error("无法创建 SVG 元素: "+t)}))}catch(e){return Promise.reject(e)}},exports.debounce=function(e,t){var n=null;return function(){var i=arguments,r=this;null!==n&&clearTimeout(n),n=setTimeout(function(){e.apply(r,[].slice.call(i)),n=null},t)}},exports.decodeJWT=function(e){var t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=decodeURIComponent(atob(t).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(n)},exports.delayExecution=function(e,t){void 0===t&&(t=0);var n=[].slice.call(arguments,2);return new Promise(function(i){0===t?i(e.apply(void 0,n)):setTimeout(function(){i(e.apply(void 0,n))},t)})},exports.extractCompaniesFromRawProfile=function(e){var t,n=new Map;return null==(t=e.profilePositionGroups)||null==(t=t.elements)||t.forEach(function(e){var t;[e.company].concat((null==(t=e.profilePositionInPositionGroup)||null==(t=t.elements)?void 0:t.map(function(e){return e.company}))||[]).filter(Boolean).forEach(function(e){var t,i=V(e.entityUrn);if(i&&!n.has(i)){var r;if(e.industry&&null!=(t=e.industryUrns)&&t.length){var o=e.industry[e.industryUrns[0]];r=null==o?void 0:o.name}n.set(i,{linkedinId:i,universalName:e.universalName,name:e.name||"",industry:r,employeeCountRange:e.employeeCountRange?{start:e.employeeCountRange.start,end:e.employeeCountRange.end}:void 0,logoUrl:$(e.logo)})}})}),Array.from(n.values())},exports.generateStableUniqueKey=i,exports.getCompanyPublicId=G,exports.getContactInfo=D,exports.getCookie=function(e,t,n){return void 0===n&&(n=!1),chrome.cookies.get({url:e,name:t}).then(function(e){var t;return n?(null==e||null==(t=e.value)?void 0:t.replace(/"/g,""))||"":null!=e?e:void 0})},exports.getCookies=function(e,t){return void 0===t&&(t=!1),chrome.cookies.getAll({url:e}).then(function(e){return t?function(e){return e.map(function(e){return e.name+"="+e.value}).join("; ")}(e):e})},exports.getElement=U,exports.getExtensionInfo=function(){var e,t,n;return{locale:null==(e=chrome.i18n)?void 0:e.getUILanguage(),extId:null==(t=chrome.runtime)?void 0:t.id,version:null==(n=chrome.runtime)?void 0:n.getManifest().version}},exports.getGlobal=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:this},exports.getLinkedinCompany=function(e,t){var n=t.csrfToken,i=t.cookies;try{var r="string"==typeof e?{universalName:e}:e,o="universalName"in r,a=A+"/organization/companies"+(o?"?q=universalName&universalName="+r.universalName:"/"+r.urn),l=N(n,i);return Promise.resolve(fetch(a,{method:"GET",headers:l}).then(function(e){try{var t,n=function(){if(e.ok)return Promise.resolve(e.json()).then(function(e){if(o){var n,i=(null==(n=e.elements)?void 0:n[0])||null;return t=1,i}return t=1,e})}();return Promise.resolve(n&&n.then?n.then(function(e){return t?e:null}):t?n:null)}catch(e){return Promise.reject(e)}}).catch(function(e){return console.error(e),null}))}catch(e){return Promise.reject(e)}},exports.getLinkedinMe=function(e){var t=e.csrfToken,n=e.cookies;try{var i=A+"/me",r=N(t,n);return Promise.resolve(fetch(i,{method:"GET",headers:r}).then(function(e){try{return Promise.resolve(e.ok?e.json():null)}catch(e){return Promise.reject(e)}}).catch(function(e){return console.error(e),null}))}catch(e){return Promise.reject(e)}},exports.getLinkedinPageType=W,exports.getLinkedinProfile=function(e,t){var n=t.csrfToken,i=t.cookies;try{var r=A+"/identity/dash/profiles?q=memberIdentity&memberIdentity="+e+"&decorationId=com.linkedin.voyager.dash.deco.identity.profile.FullProfileWithEntities-26",o=N(n,i);return Promise.resolve(fetch(r,{method:"GET",headers:o}).then(function(e){try{var t,n=function(){if(e.ok)return Promise.resolve(e.json()).then(function(e){var n,i=(null==(n=e.elements)?void 0:n[0])||null;return t=1,i})}();return Promise.resolve(n&&n.then?n.then(function(e){return t?e:null}):t?n:null)}catch(e){return Promise.reject(e)}}).catch(function(e){return console.error(e),null}))}catch(e){return Promise.reject(e)}},exports.getLinkedinPublicId=function(e){var t;return void 0===e&&(e=""),F(e=e||(null==(t=window.top)?void 0:t.location.href)||document.URL)||G(e)||""},exports.getPageType=function(e){if(void 0===e&&(e=""),!e)return"";var t=Object.keys(H),n=new URL(e).protocol.replace(":","");return t.includes(n)?n:W(e)},exports.getPostPublicId=function(e){var t;void 0===e&&(e="");var n=((e=e||(null==(t=window.top)?void 0:t.location.href)||document.URL).match(/linkedin\.com\/posts\/([^\/]+)\//)||[])[1]||"";return decodeURIComponent(n)},exports.getProfilePublicId=F,exports.isCloneable=t,exports.isEqual=a,exports.isErrorResponse=function(e){return"object"==typeof e&&null!==e&&"__error"in e&&!0===e.__error},exports.isLinkedInUrl=function(e){return/^https?:\/\/(www|.{2})\.linkedin\.com/.test(e)},exports.isPrimitive=n,exports.launchWebAuthFlow=function(e){var t=e.clientId,n=e.responseType,i=void 0===n?"code":n,r=e.state,o=e.nonce,a=e.interactive,l=void 0===a||a;try{var s=chrome.identity.getRedirectURL(),c=Array.isArray(i)?i:[i],u=new URL("https://accounts.google.com/o/oauth2/v2/auth");return u.searchParams.set("client_id",t),u.searchParams.set("redirect_uri",s),u.searchParams.set("response_type",c.join(" ")),u.searchParams.set("scope","openid email profile"),o&&u.searchParams.set("nonce",o),r&&u.searchParams.set("state",r),Promise.resolve(chrome.identity.launchWebAuthFlow({url:u.toString(),interactive:l}).then(function(e){if(!e)return Promise.reject(new Error("redirectUrl is null"));var t=e.includes("?")?"?":"#",n=new URLSearchParams(e.split(t)[1]),i={};return n.forEach(function(e,t){i[t]=e}),i}).catch(function(e){return console.log("error",e),Promise.reject(e)}))}catch(e){return Promise.reject(e)}},exports.pageTypeMap=H,exports.scrollToBottom=E,exports.scrollToBottomIfNeeded=function(e){e&&("true"!==e.dataset.isListeningForUserScroll&&(function(e){e&&e.addEventListener("scroll",function(){!function(e,t){e.dataset.userInteracted=t?"true":"false"}(e,e.scrollTop+e.clientHeight<e.scrollHeight-5)})}(e),e.dataset.isListeningForUserScroll="true"),"true"!==e.dataset.userInteracted&&E(e))},exports.serialize=function(e,t){var n;void 0===t&&(t={});var i=new k,r=null!=(n=t.key)?n:function(){return""};return function(){var t=[].slice.call(arguments);return i.run(r.apply(void 0,t),function(){return e.apply(void 0,t)})}},exports.singleExecutionWrapper=function(t,n){void 0===n&&(n=0);var i=function(){if(i.isExecuting)return Promise.resolve(e);i.isExecuting=!0;var r,o=performance.now(),a=function(){var e=performance.now()-o;n&&n>e?setTimeout(function(){i.isExecuting=!1},n-e):i.isExecuting=!1};try{r=Promise.resolve(t.apply(this,[].slice.call(arguments)))}catch(e){return a(),Promise.reject(e)}return r.then(a,a),r};return i.isExecuting=!1,i},exports.singleFlight=function(e,t){var n;void 0===t&&(t={});var i=new Map,r=null!=(n=t.key)?n:function(){return""},o=function(){var t=[].slice.call(arguments),n=r.apply(void 0,t),o=i.get(n);if(o)return o;var a=function(e,t){try{return Promise.resolve(e.apply(void 0,t))}catch(e){return Promise.reject(e)}}(e,t).finally(function(){i.delete(n)});return i.set(n,a),a};return o.isRunning=function(){return i.has(r.apply(void 0,[].slice.call(arguments)))},Object.defineProperty(o,"size",{get:function(){return i.size}}),o},exports.transformRawCompany=function(e){var t,n,i,r,o,a,l,s,c,u,d=(null==(t=e.elements)?void 0:t[0])||e,h=V(d.entityUrn);if(!h)throw new Error("Cannot extract linkedinId from company data");for(var m,p=(null!=(n=d.defaultLocale)&&n.language&&null!=(i=d.defaultLocale)&&i.country?d.defaultLocale.language+"_"+d.defaultLocale.country:null)||(null!=(r=d.multiLocaleNames)&&r.localized?Object.keys(d.multiLocaleNames.localized)[0]:null)||"en_US",v=null==(o=d.multiLocaleNames)?void 0:o.localized,g=Y(v,p,d.name),y=null==(a=d.multiLocaleDescriptions)?void 0:a.localized,b=Y(y,p,"string"==typeof d.description?d.description:void 0)||void 0,k={},w=q(v,p),C=q(y,p),P=new Set([].concat(Object.keys(w),Object.keys(C))),x=f(P);!(m=x()).done;){var S=m.value,L={};w[S]&&(L.name=w[S]),C[S]&&(L.description=C[S]),Object.keys(L).length>0&&(k[S]=L)}var I=d.headquarter||(null==(l=d.confirmedLocations)?void 0:l.find(function(e){return e.headquarter})),E=Q(d.logo)||Q(null==(s=d.logos)?void 0:s.logo),_=Q(d.backgroundCoverImage),O=d.jobSearchPageUrl||void 0,j=null==(c=d.companyIndustries)||null==(c=c[0])?void 0:c.localizedName,T=P.size>0?[p].concat(Array.from(P)):void 0;return{linkedinId:h,universalName:d.universalName,name:g,description:b,industry:j,employeeCountRange:d.staffCount?{start:d.staffCount,end:d.staffCount}:d.staffCountRange?{start:d.staffCountRange.start,end:d.staffCountRange.end}:void 0,headquarters:I?{country:I.country,city:I.city,geographicArea:I.geographicArea,postalCode:I.postalCode,line1:I.line1}:void 0,logoUrl:E,backgroundCoverUrl:_,specialities:d.specialities,companyType:d.type,foundedYear:null==(u=d.foundedOn)?void 0:u.year,websiteUrl:d.companyPageUrl,jobSearchPageUrl:O,primaryLocale:p,supportedLocales:T,translations:Object.keys(k).length>0?k:void 0}},exports.transformRawProfile=function(e){var t,n,i,r,o,a,l,s,c=V(e.objectUrn);if(!c)throw new Error("Cannot extract memberId from rawProfile");for(var u,d=function(e){if(e)return e.language+"_"+e.country}(e.primaryLocale),h=function(e){if(null!=e&&e.length)return e.map(function(e){return e.language+"_"+e.country})}(e.supportedLocales),m=Y(e.multiLocaleFirstName,d,e.firstName),p=Y(e.multiLocaleLastName,d,e.lastName),v=Y(e.multiLocaleHeadline,d,e.headline),g=Y(e.multiLocaleSummary,d,e.summary),y={},b=(null==h?void 0:h.filter(function(e){return e!==d}))||[],k=f(b);!(u=k()).done;){var w,C,P,x,S=u.value,L={},I=null==(w=e.multiLocaleFirstName)?void 0:w[S],E=null==(C=e.multiLocaleLastName)?void 0:C[S],_=null==(P=e.multiLocaleHeadline)?void 0:P[S],O=null==(x=e.multiLocaleSummary)?void 0:x[S];I&&(L.firstName=I),E&&(L.lastName=E),_&&(L.headline=_),O&&(L.summary=O),Object.keys(L).length>0&&(y[S]=L)}var j=(null==(t=e.profileSkills)||null==(t=t.elements)?void 0:t.map(function(e){return e.name}))||[],T=(null==(n=e.profileLanguages)||null==(n=n.elements)?void 0:n.map(function(e){return{name:e.name,proficiency:e.proficiency}}))||[],A=(null==(i=e.profileHonors)||null==(i=i.elements)?void 0:i.map(function(e){return{title:e.title,issuer:e.issuer,issuedOn:X(e.issuedOn)}}))||[],N=(null==(r=e.profileEducations)||null==(r=r.elements)?void 0:r.map(function(e){var t,n,i;return{school:Y(e.multiLocaleSchoolName,d,e.schoolName||(null==(t=e.school)?void 0:t.name)),degree:Y(e.multiLocaleDegreeName,d,e.degreeName)||void 0,fieldOfStudy:Y(e.multiLocaleFieldOfStudy,d,e.fieldOfStudy)||void 0,startDate:X(null==(n=e.dateRange)?void 0:n.start),endDate:X(null==(i=e.dateRange)?void 0:i.end)}}))||[],M=(null==(o=e.profileCertifications)||null==(o=o.elements)?void 0:o.map(function(e){var t,n;return{name:Y(e.multiLocaleName,d,e.name),authority:Y(e.multiLocaleAuthority,d,e.authority)||void 0,startDate:X(null==(t=e.dateRange)?void 0:t.start),endDate:X(null==(n=e.dateRange)?void 0:n.end),licenseNumber:e.licenseNumber,url:e.url}}))||[],R=[];null==(a=e.profilePositionGroups)||null==(a=a.elements)||a.forEach(function(e){var t;((null==(t=e.profilePositionInPositionGroup)?void 0:t.elements)||[]).forEach(function(t){for(var n,i,r,o,a,l,s=t.company||e.company,c=V(t.companyUrn||(null==s?void 0:s.entityUrn)),u=Y(t.multiLocaleTitle,d,t.title),h=Y(t.multiLocaleCompanyName,d,t.companyName||(null==s?void 0:s.name)),m=Y(t.multiLocaleDescription,d,t.description)||void 0,p={},v=f(b);!(a=v()).done;){var g,y,k,w=a.value,C={},P=null==(g=t.multiLocaleTitle)?void 0:g[w],x=null==(y=t.multiLocaleDescription)?void 0:y[w],S=null==(k=t.multiLocaleCompanyName)?void 0:k[w];P&&(C.title=P),x&&(C.description=x),S&&(C.companyName=S),Object.keys(C).length>0&&(p[w]=C)}if(null!=s&&s.industry&&null!=s&&null!=(n=s.industryUrns)&&n.length){var L=s.industry[s.industryUrns[0]];l=null==L?void 0:L.name}R.push({linkedinPositionId:J(t.entityUrn),companyName:h,companyLinkedinId:c,companyUniversalName:null==s?void 0:s.universalName,title:u,description:m,startDate:X(null==(i=t.dateRange)?void 0:i.start),endDate:X(null==(r=t.dateRange)?void 0:r.end),isCurrent:!(null!=(o=t.dateRange)&&o.end),companyLogoUrl:$(null==s?void 0:s.logo),companyIndustry:l,companyEmployeeCountRange:null!=s&&s.employeeCountRange?{start:s.employeeCountRange.start,end:s.employeeCountRange.end}:void 0,translations:Object.keys(p).length>0?p:void 0})})});var U,z,D=(null==(l=e.geoLocation)||null==(l=l.geo)?void 0:l.defaultLocalizedName)||void 0,B=null==(s=e.industry)?void 0:s.name;return{memberId:c,publicIdentifier:e.publicIdentifier,firstName:m,lastName:p,headline:v||void 0,summary:g||void 0,location:D,pictureUrl:(z=e.profilePicture,Q(z)),backgroundPictureUrl:(U=e.backgroundPicture,Q(U)),isPremium:!0===e.premium,industry:B,primaryLocale:d,supportedLocales:h,skills:j,languages:T.length>0?T:void 0,honors:A.length>0?A:void 0,educations:N.length>0?N:void 0,certifications:M.length>0?M:void 0,positions:R.length>0?R:void 0,translations:Object.keys(y).length>0?y:void 0}};
|
|
1
|
+
var e=Symbol("undefined");function t(e){return"function"==typeof(null==e?void 0:e.clone)}function n(e){var t=typeof e;return null===e||"string"===t||"number"===t||"boolean"===t||"undefined"===t}function i(e){return n(e)?String(e):JSON.stringify(e,function(e,t){return"object"!=typeof t||null===t||Array.isArray(t)?t:Object.keys(t).sort().reduce(function(e,n){return e[n]=t[n],e},{})})}function r(e){if(null===e||"object"!=typeof e)return e;if(t(e))return e.clone();if(Array.isArray(e))return e.map(function(e){return r(e)});var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=r(e[i]));return n}function o(e){return new Proxy({},{get:function(t,n){return t.hasOwnProperty(n)?t[n]:e}})}function a(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var r=0,o=n;r<o.length;r++){var l=o[r];if(!i.includes(l)||!a(e[l],t[l]))return!1}return!0}var l=o(e),s=o(!1);function c(e){return l[e]}function u(t){return l[t]!==e}var d={timeout:6e4,timeoutResult:{code:408,msg:"请求超时"},identifier:""};function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function m(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,g(i.key),i)}}function p(e,t,n){return t&&m(e.prototype,t),n&&m(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return h(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},v.apply(null,arguments)}function g(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}var y=function(){},b=/*#__PURE__*/function(){function e(){this.tail=Promise.resolve(),this.running=0}return e.prototype.run=function(e){var t=this;this.running++;var n=this.tail.then(e,e),i=function(){t.running--};return this.tail=n.then(i,i),n},p(e,[{key:"size",get:function(){return this.running}},{key:"idle",get:function(){return 0===this.running}}])}(),k=/*#__PURE__*/function(){function e(){this.locks=new Map}return e.prototype.run=function(e,t){var n=this,i=this.locks.get(e);i||(i=new b,this.locks.set(e,i));var r=i,o=r.run(t);return o.then(y,y).then(function(){r.idle&&n.locks.get(e)===r&&n.locks.delete(e)}),o},p(e,[{key:"size",get:function(){return this.locks.size}}])}();function w(e,t,n){if(!e.s){if(n instanceof C){if(!n.s)return void(n.o=w.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(w.bind(null,e,t),w.bind(null,e,2));e.s=t,e.v=n;const i=e.o;i&&i(e)}}var C=/*#__PURE__*/function(){function e(){}return e.prototype.then=function(t,n){var i=new e,r=this.s;if(r){var o=1&r?t:n;if(o){try{w(i,1,o(this.v))}catch(e){w(i,2,e)}return i}return this}return this.o=function(e){try{var r=e.v;1&e.s?w(i,1,t?t(r):r):n?w(i,1,n(r)):w(i,2,r)}catch(e){w(i,2,e)}},i},e}();function x(e){return e instanceof C&&1&e.s}var P=/*#__PURE__*/function(){function e(e){this.storageKey=void 0,this.data={},this.listeners=[],this.storageKey=e}e.getInstanceKey=function(e){return"memory:"+e},e.getInstance=function(t){var n=this.getInstanceKey(t);return this.instances.has(n)||this.instances.set(n,new e(t)),this.instances.get(n)},e.create=function(e){return this.getInstance(e)},e.clearInstance=function(e){var t=this.getInstanceKey(e),n=this.instances.get(t);n&&n.clearChangeCallbacks(),this.instances.delete(t)},e.clearAllInstances=function(){this.instances.forEach(function(e){e.clearChangeCallbacks()}),this.instances.clear()};var t=e.prototype;return t.set=function(e,t){try{var n,i=v({},this.data);this.data=v({},this.data,((n={})[e]=t,n)),this.triggerChange(i,this.data)}catch(e){throw console.error("MemoryStore.set 失败:",e),e}},t.get=function(e){try{return this.data[e]}catch(e){throw console.error("MemoryStore.get 失败:",e),e}},t.getAll=function(){return v({},this.data)},t.remove=function(e){try{if(e in this.data){var t=v({},this.data),n=v({},this.data);delete n[e],this.data=n,this.triggerChange(t,this.data)}}catch(e){throw console.error("MemoryStore.remove 失败:",e),e}},t.clear=function(){try{var e=v({},this.data);this.data={},this.triggerChange(e,this.data)}catch(e){throw console.error("MemoryStore.clear 失败:",e),e}},t.setMultiple=function(e){try{var t=v({},this.data);this.data=v({},this.data,e),this.triggerChange(t,this.data)}catch(e){throw console.error("MemoryStore.setMultiple 失败:",e),e}},t.onChanged=function(e,t){this.listeners.push({prop:"string"==typeof e?e:void 0,callback:"string"==typeof e?t:e})},t.offChanged=function(e,t){var n="string"==typeof e?e:void 0,i="string"==typeof e?t:e;this.listeners=this.listeners.filter(function(e){return!(e.prop===n&&e.callback===i)})},t.triggerChange=function(e,t){this.listeners.length>0&&this.listeners.forEach(function(n){var i=n.prop,r=n.callback;try{if(i)a(t[i],e[i])||r(t[i],e[i]);else{var o={};new Set([].concat(Object.keys(t),Object.keys(e))).forEach(function(n){var i=n;a(t[i],e[i])||(o[i]={newValue:t[i],oldValue:e[i]})}),Object.keys(o).length>0&&r(o)}}catch(e){console.error("MemoryStore 变化回调执行失败:",e)}})},t.clearChangeCallbacks=function(){this.listeners=[]},t.has=function(e){try{return e in this.data}catch(e){return console.error("MemoryStore.has 失败:",e),!1}},t.getSize=function(){try{var e=JSON.stringify(this.data);return new Blob([e]).size}catch(e){return console.error("MemoryStore.getSize 失败:",e),0}},t.getStoreKey=function(){return this.storageKey},t.getStoreType=function(){return"memory"},e}();function S(e,t,n,i){if(void 0===i&&(i=!1),t in e.style)e.style[t]=n;else{var r=i?"important":"";e.style.setProperty(t,String(n),r)}}function L(e){var t=document.createElementNS("http://www.w3.org/2000/svg",e.type);if(e.props)for(var n=0,i=Object.entries(e.props);n<i.length;n++){var r=i[n];t.setAttribute(r[0],r[1])}if("string"==typeof e.children){var o=document.createTextNode(e.children);t.appendChild(o)}else Array.isArray(e.children)&&e.children.forEach(function(e){var n=L(e);t.appendChild(n)});return t}function I(e){var t=(new DOMParser).parseFromString(e,"image/svg+xml").documentElement;if(!(t instanceof SVGElement))throw new Error("解析失败,结果不是有效的 SVG 元素");return t}function E(e){e&&setTimeout(function(){e.scrollTop=e.scrollHeight},0)}P.instances=new Map;var _=/*#__PURE__*/function(){function e(e,t){void 0===t&&(t={}),this.element=void 0,this.options=void 0,this.isDragging=!1,this.startX=0,this.startY=0,this.initialX=0,this.initialY=0,this.threshold=5,this.onMouseMoveHandler=void 0,this.onMouseUpHandler=void 0,this.element=e,this.options=v({coordinate:"tl"},t);var n=getComputedStyle(this.element).position;n&&"static"!==n||(this.element.style.position="absolute"),this.options.position&&(this.element.style.position=this.options.position),this.onMouseMoveHandler=this.onMouseMove.bind(this),this.onMouseUpHandler=this.onMouseUp.bind(this),this.element.addEventListener("mousedown",this.onMouseDown.bind(this))}var t=e.prototype;return t.onMouseDown=function(e){e.preventDefault(),this.startX=e.clientX,this.startY=e.clientY,this.initialX=parseInt(window.getComputedStyle(this.element).left,10)||0,this.initialY=parseInt(window.getComputedStyle(this.element).top,10)||0,document.addEventListener("mousemove",this.onMouseMoveHandler),document.addEventListener("mouseup",this.onMouseUpHandler)},t.getBoundedPosition=function(e,t){var n,i,r=this.element.getBoundingClientRect();if("fixed"===getComputedStyle(this.element).position)n=window.innerWidth-r.width,i=window.innerHeight-r.height;else{var o=(this.element.offsetParent||document.documentElement).getBoundingClientRect();n=o.width-r.width,i=o.height-r.height}return{x:Math.min(Math.max(0,e),n),y:Math.min(Math.max(0,t),i)}},t.onMouseMove=function(e){if(!this.isDragging){var t=e.clientY-this.startY;(Math.abs(e.clientX-this.startX)>this.threshold||Math.abs(t)>this.threshold)&&(this.isDragging=!0,this.options.onDragStart&&this.options.onDragStart(e))}if(this.isDragging){var n=this.getBoundedPosition(this.initialX+(e.clientX-this.startX),this.initialY+(e.clientY-this.startY));this.element.style.right="auto",this.element.style.bottom="auto",this.element.style.left=n.x+"px",this.element.style.top=n.y+"px",this.options.onDrag&&this.options.onDrag(e)}},t.convertCoordinate=function(){var e=this.element.getBoundingClientRect(),t=getComputedStyle(this.element).position,n=null,i=null;if("fixed"===t?(n=null,i=new DOMRect(0,0,window.innerWidth,window.innerHeight)):((n=this.element.offsetParent)||(n=document.documentElement),"static"===getComputedStyle(n).position?(n=null,i=new DOMRect(0,0,window.innerWidth,window.innerHeight)):i=n.getBoundingClientRect()),i){var r,o;if("fixed"===t)r=e.left,o=e.top;else if(r=e.left-i.left,o=e.top-i.top,n instanceof HTMLElement){var a=getComputedStyle(n);r-=parseFloat(a.borderLeftWidth)||0,o-=parseFloat(a.borderTopWidth)||0}else r+=window.scrollX,o+=window.scrollY;switch(this.options.coordinate){case"tr":var l=i.width-r-e.width;this.element.style.left="auto",this.element.style.right=l+"px",this.element.style.top=o+"px",this.element.style.bottom="auto";break;case"bl":var s=i.height-o-e.height;this.element.style.left=r+"px",this.element.style.right="auto",this.element.style.top="auto",this.element.style.bottom=s+"px";break;case"br":var c=i.width-r-e.width,u=i.height-o-e.height;this.element.style.left="auto",this.element.style.right=c+"px",this.element.style.top="auto",this.element.style.bottom=u+"px";break;default:this.element.style.left=r+"px",this.element.style.right="auto",this.element.style.top=o+"px",this.element.style.bottom="auto"}}},t.onMouseUp=function(e){this.isDragging&&(this.options.coordinate&&"tl"!==this.options.coordinate&&this.convertCoordinate(),this.options.onDragEnd&&this.options.onDragEnd(e)),this.isDragging=!1,document.removeEventListener("mousemove",this.onMouseMoveHandler),document.removeEventListener("mouseup",this.onMouseUpHandler)},e}(),O=/*#__PURE__*/function(){function e(e,t){void 0===t&&(t="local"),this.storageKey=void 0,this.storeType=void 0,this.store=void 0,this.listeners=[],this.storageKey=e,this.storeType=t}e.getInstanceKey=function(e,t){return void 0===t&&(t="local"),t+":"+e},e.getInstance=function(t,n){void 0===n&&(n="local");var i=this.getInstanceKey(t,n);return this.instances.has(i)||this.instances.set(i,new e(t,n)),this.instances.get(i)},e.local=function(e){return this.getInstance(e,"local")},e.session=function(e){return this.getInstance(e,"session")},e.clearInstance=function(e,t){void 0===t&&(t="local");var n=this.getInstanceKey(e,t);this.instances.delete(n)},e.clearAllInstances=function(){this.instances.clear()};var t=e.prototype;return t.getStore=function(){return this.store||(this.store="local"===this.storeType?localStorage:sessionStorage),this.store},t.set=function(e,t){try{var n,i=v({},this.getAll(),((n={})[e]=t,n));this.getStore().setItem(this.storageKey,JSON.stringify(i))}catch(e){throw console.error("WebStore.set 失败:",e),e}},t.get=function(e){try{var t=this.getAll();return null==t?void 0:t[e]}catch(e){throw console.error("WebStore.get 失败:",e),e}},t.getAll=function(){try{var e=this.getStore().getItem(this.storageKey);return e?JSON.parse(e):{}}catch(e){return console.error("WebStore.getAll 失败:",e),{}}},t.remove=function(e){try{var t=this.getAll();t&&e in t&&(delete t[e],this.getStore().setItem(this.storageKey,JSON.stringify(t)))}catch(e){throw console.error("WebStore.remove 失败:",e),e}},t.clear=function(){try{this.getStore().removeItem(this.storageKey)}catch(e){throw console.error("WebStore.clear 失败:",e),e}},t.setMultiple=function(e){try{var t=v({},this.getAll(),e);this.getStore().setItem(this.storageKey,JSON.stringify(t))}catch(e){throw console.error("WebStore.setMultiple 失败:",e),e}},e.setupGlobalListener=function(){var e=this;this.isGlobalListenerInitialized||(this.isGlobalListenerInitialized=!0,window.addEventListener("storage",function(t){e.instances.forEach(function(e){if(t.key===e.storageKey&&t.storageArea===e.getStore()){var n=t.oldValue?JSON.parse(t.oldValue):{},i=t.newValue?JSON.parse(t.newValue):{};e.dispatchChange(i,n)}})}))},t.dispatchChange=function(e,t){var n=e||{},i=t||{};this.listeners.forEach(function(e){var t=e.prop,r=e.callback;if(t)a(n[t],i[t])||r(n[t],i[t]);else{var o={};new Set([].concat(Object.keys(n),Object.keys(i))).forEach(function(e){var t=e;a(n[t],i[t])||(o[t]={newValue:n[t],oldValue:i[t]})}),Object.keys(o).length>0&&r(o)}})},t.onChanged=function(t,n){e.setupGlobalListener(),this.listeners.push({prop:"string"==typeof t?t:void 0,callback:"string"==typeof t?n:t})},t.offChanged=function(e,t){var n="string"==typeof e?e:void 0,i="string"==typeof e?t:e;this.listeners=this.listeners.filter(function(e){return!(e.prop===n&&e.callback===i)})},t.has=function(e){try{return void 0!==this.get(e)}catch(e){return console.error("WebStore.has 失败:",e),!1}},t.getSize=function(){try{var e=this.getStore().getItem(this.storageKey)||"";return new Blob([e]).size}catch(e){return console.error("WebStore.getSize 失败:",e),0}},t.getStoreKey=function(){return this.storageKey},e}();function j(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}O.instances=new Map,O.isGlobalListenerInitialized=!1;var T=/*#__PURE__*/function(){function e(e,t){void 0===t&&(t="local"),this.storageKey=void 0,this.storeType=void 0,this.store=void 0,this.listeners=[],this.storageKey=e,this.storeType=t}e.getInstanceKey=function(e,t){return void 0===t&&(t="local"),t+":"+e},e.getInstance=function(t,n){void 0===n&&(n="local");var i=this.getInstanceKey(t,n);return this.instances.has(i)||this.instances.set(i,new e(t,n)),this.instances.get(i)},e.local=function(e){return this.getInstance(e,"local")},e.sync=function(e){return this.getInstance(e,"sync")},e.clearInstance=function(e,t){void 0===t&&(t="local");var n=this.getInstanceKey(e,t);this.instances.delete(n)},e.clearAllInstances=function(){this.instances.clear()};var t=e.prototype;return t.getStore=function(){return this.store||(this.store=chrome.storage[this.storeType]),this.store},t.set=function(e,t){try{var n=this;return Promise.resolve(j(function(){return Promise.resolve(n.getAll()).then(function(i){var r,o,a=v({},i,((r={})[e]=t,r));return Promise.resolve(n.getStore().set((o={},o[n.storageKey]=a,o))).then(function(){})})},function(e){throw console.error("ChromeStore.set 失败:",e),e}))}catch(e){return Promise.reject(e)}},t.get=function(e){try{var t=this;return Promise.resolve(j(function(){return Promise.resolve(t.getAll()).then(function(t){return null==t?void 0:t[e]})},function(e){throw console.error("ChromeStore.get 失败:",e),e}))}catch(e){return Promise.reject(e)}},t.getAll=function(){try{var e=this;return Promise.resolve(j(function(){return Promise.resolve(e.getStore().get(e.storageKey)).then(function(t){return t[e.storageKey]||{}})},function(e){throw console.error("ChromeStore.getAll 失败:",e),e}))}catch(e){return Promise.reject(e)}},t.remove=function(e){try{var t=this;return Promise.resolve(j(function(){return Promise.resolve(t.getAll()).then(function(n){var i=function(){var i;if(n&&e in n)return delete n[e],Promise.resolve(t.getStore().set((i={},i[t.storageKey]=n,i))).then(function(){})}();if(i&&i.then)return i.then(function(){})})},function(e){throw console.error("ChromeStore.remove 失败:",e),e}))}catch(e){return Promise.reject(e)}},t.clear=function(){try{var e=this;return Promise.resolve(j(function(){return Promise.resolve(e.getStore().remove(e.storageKey)).then(function(){})},function(e){throw console.error("ChromeStore.clear 失败:",e),e}))}catch(e){return Promise.reject(e)}},t.setMultiple=function(e){try{var t=this;return Promise.resolve(j(function(){return Promise.resolve(t.getAll()).then(function(n){var i,r=v({},n,e);return Promise.resolve(t.getStore().set((i={},i[t.storageKey]=r,i))).then(function(){})})},function(e){throw console.error("ChromeStore.setMultiple 失败:",e),e}))}catch(e){return Promise.reject(e)}},e.setupGlobalListener=function(){var e=this;this.isGlobalListenerInitialized||(this.isGlobalListenerInitialized=!0,chrome.storage.onChanged.addListener(function(t,n){e.instances.forEach(function(e){if(e.storeType===n&&t[e.storageKey]){var i=t[e.storageKey];e.dispatchChange(i.newValue,i.oldValue)}})}))},t.dispatchChange=function(e,t){var n=e||{},i=t||{};this.listeners.forEach(function(e){var t=e.prop,r=e.callback;if(t)a(n[t],i[t])||r(n[t],i[t]);else{var o={};new Set([].concat(Object.keys(n),Object.keys(i))).forEach(function(e){var t=e;a(n[t],i[t])||(o[t]={newValue:n[t],oldValue:i[t]})}),Object.keys(o).length>0&&r(o)}})},t.onChanged=function(t,n){e.setupGlobalListener(),this.listeners.push({prop:"string"==typeof t?t:void 0,callback:"string"==typeof t?n:t})},t.offChanged=function(e,t){var n="string"==typeof e?e:void 0,i="string"==typeof e?t:e;this.listeners=this.listeners.filter(function(e){return!(e.prop===n&&e.callback===i)})},t.has=function(e){try{var t=this;return Promise.resolve(j(function(){return Promise.resolve(t.get(e)).then(function(e){return void 0!==e})},function(e){return console.error("ChromeStore.has 失败:",e),!1}))}catch(e){return Promise.reject(e)}},t.getSize=function(){try{var e=this;return Promise.resolve(j(function(){return Promise.resolve(e.getAll()).then(function(e){var t=JSON.stringify(e);return new Blob([t]).size})},function(e){return console.error("ChromeStore.getSize 失败:",e),0}))}catch(e){return Promise.reject(e)}},t.getStoreKey=function(){return this.storageKey},e}();T.instances=new Map,T.isGlobalListenerInitialized=!1;var A="https://www.linkedin.com/voyager/api";function N(e,t){var n,i={"csrf-token":e};return t&&(n="string"==typeof t?t:Object.entries(t).map(function(e){return e[0]+"="+e[1]}).join("; "))&&(i.Cookie=n),i}var M={profilePage:{userPicture:[".pv-top-card__non-self-photo-wrapper img","#recent-activity-top-card img",".pv-top-card__photo-wrapper img",'div[componentkey^="com.linkedin.sdui.profile.card"] div[data-view-name="profile-top-card-member-photo"] img'],userName:['a[href^="/in"] h1',"#recent-activity-top-card h3",'div[data-view-name="profile-top-card-verified-badge"] div[role="button"]','a[href^="https://www.linkedin.com/in"] h2','div[componentKey$="Topcard"] a[href^="https://www.linkedin.com"] h2','div[componentkey$="Topcard"] h2'],userOccupation:[".artdeco-entity-lockup .artdeco-entity-lockup__subtitle","#recent-activity-top-card h4"],lemlistProfileCardLeadName:[".lemlist-profile-card .lead-name"],linkedinProfileCard:[".scaffold-layout__main .artdeco-card:first-child","main .artdeco-card:first-child:not(.lemlist-header)",'div[componentkey^="com.linkedin.sdui.profile.card"]'],lemlistProfileCard:[".lemlist-profile-card"],alreadyInLemlistTag:[".lemlist-profile-card .already-in-lemlist"],notInLemlistTag:[".lemlist-profile-card .not-in-lemlist"],findEmailTag:[".lemlist-profile-card .find-email"],findPhoneTag:[".lemlist-profile-card .find-phone"],lemlistEmailFound:[".lemlist-profile-card .lemlist-email-found"],privateProfileInfoSection:[".pv-profile-info-section"],howToContainer:["#profile-content, header#global-nav"],companyName:[".top-card-background-hero-image+div .mt2 ul>li span",'div[componentkey^="com.linkedin.sdui.profile.card"] div:has(div[data-view-name="profile-top-card-verified-badge"]) + div div[role="button"] p'],companyLogo:[".top-card-background-hero-image+div .mt2 ul>li img"],howToTippyContainer:["#lemlist-sidebar .sidebar"],lemlistListContainer:[".ui-row.lemlist-list-container"],campaignsListContainer:[".ui-row.sm.campaigns-list-container"],contactListContainer:[".ui-row.sm.contact-list-container"],addButtonText:[".lemlist-add-button-text"],location:["#profile-content .artdeco-card .top-card-background-hero-image+div .text-body-small.inline.t-black--light"],campaignsListContainerDisplay:[".ui-col.sm.campaigns-list-container-display"],contactListContainerDisplay:[".ui-col.sm.contact-list-container-display"],notInLemlistButton:[".lemlist-profile-card .action-primary.not-in-lemlist"],alreadyInLemlistButton:[".lemlist-profile-card .action-primary.already-in-lemlist"],mainExperienceContainer:[".artdeco-card:has(#experience) li:first-child",'div[componentkey^="com.linkedin.sdui.profile.card"][componentkey$="ExperienceTopLevelSection"] div:has(h2) + div > div'],experienceCompanyLogo:['[data-field="experience_company_logo"] img','div[componentkey^="com.linkedin.sdui.profile.card"][componentkey$="ExperienceTopLevelSection"] div:has(h2) + div figure[data-view-name="image"] img'],experienceCompanyName:['div:has([data-field="experience_company_logo"])+div .t-normal span:not(.visually-hidden)'],experienceOccupation:['div:has([data-field="experience_company_logo"])+div .t-bold span:not(.visually-hidden)'],experienceMultipleCompany:["li:has([data-view-name=profile-component-entity] .pvs-entity__sub-components .pvs-entity__sub-components) .t-bold span:not(.visually-hidden)"],experienceMultipleOccupation:['[data-view-name="profile-component-entity"] li:first-child .t-bold span:not(.visually-hidden)'],memberId:["[data-member-id]"],lemlistHowToOverlay:[".lemlist-how-to-overlay"]},salesNavListsPeoplePage:{fullName:['[data-anonymize="person-name"]'],userOccupation:['[data-anonymize="job-title"]'],companyName:['[data-anonymize="company-name"]'],userPicture:['img[data-anonymize="headshot-photo"]'],linkedinUrl:['a[href^="/sales/lead/"]'],lemlistAlreadyInCampaign:[".lemlist-already-in-campaign"],lastCell:["td:last-child"],lastHeader:["th:last-child"],linkedinCheckbox:['.artdeco-list__item input[type="checkbox"]'],linkedinCheckbox2:['[data-scroll-into-view] input[type="checkbox"]'],linkedinCheckbox3:['table input[type="checkbox"]'],linkedinCheckbox3Checked:['table input[type="checkbox"]'],linkedinCheckboxSelectAll:['input[id="bulk-actions-select"]'],bulkToolbar:['.list-detail div:has(input[type="checkbox"])'],mainContainer:["#content-main"],lemlistTableHeader:["th.lemlist-already-in-campaign"],profileSideContainer:["#inline-sidesheet-outlet"],checkboxContainer:["tr"],paginationControls:[".artdeco-pagination"]},salesNavProfilePage:{profileCardSection:["#profile-card-section"],userName:['#profile-card-section [data-anonymize="person-name"]','h1[data-anonymize="person-name"]'],userPicture:['#profile-card-section img[data-anonymize="headshot-photo"]'],userOccupation:['#profile-card-section [data-anonymize="headline"]'],profileUrl:['#profile-card-section a[href^="/sales/lead"]'],linkedinProfileCard:["#profile-card-section"],lemlistProfileCard:[".lemlist-profile-card"],findEmailTag:[".lemlist-profile-card .find-email"],findPhoneTag:[".lemlist-profile-card .find-phone"],lemlistEmailFound:[".lemlist-profile-card .lemlist-email-found"],alreadyInLemlistTag:[".lemlist-profile-card .already-in-lemlist"],notInLemlistTag:[".lemlist-profile-card .not-in-lemlist"],lemlistListContainer:[".ui-row.lemlist-list-container"],campaignsListContainer:[".ui-row.sm.campaigns-list-container"],contactListContainer:[".ui-row.sm.contact-list-container"],addButtonText:[".lemlist-add-button-text"],campaignsListContainerDisplay:[".ui-col.sm.campaigns-list-container-display"],contactListContainerDisplay:[".ui-col.sm.contact-list-container-display"],notInLemlistButton:[".lemlist-profile-card .action-primary.not-in-lemlist"],alreadyInLemlistButton:[".lemlist-profile-card .action-primary.already-in-lemlist"],location:["#profile-card-section>section>div>div:last-child div:has(svg)"],companyName:['#profile-card-section a[data-anonymize="company-name"]'],companyLogo:['#profile-card-section img[data-anonymize="company-logo"]'],moreInfoButton:["#profile-card-section section[data-x--lead-actions-bar] button[data-x--lead-actions-bar-overflow-menu]",'#profile-card-section button[aria-label="Open actions overflow menu"]'],linkedinProfileLinkButton:['#hue-web-menu-outlet a[href^="https://www.linkedin.com/in/"]'],mainExperienceContainer:['[data-sn-view-name="feature-lead-experience"]'],experienceCompanyLogo:['li:first-child img[data-anonymize="company-logo"]'],experienceCompanyName:['li:first-child [data-anonymize="company-name"]'],experienceOccupation:['li:first-child [data-anonymize="job-title"]'],experienceMultipleOccupation:['ul li ul li:first-child [data-anonymize="job-title"]','ul li [data-anonymize="job-title"]'],experienceMultipleCompany:['li:first-child [data-anonymize="company-name"]']},salesNavSearchPeoplePage:{linkedinUrl:['a[href^="/sales/lead/"]'],fullName:['[data-anonymize="person-name"]'],userOccupation:['[data-anonymize="title"]'],companyName:['a[data-anonymize="company-name"]'],userPicture:['img[data-anonymize="headshot-photo"]'],actionsDiv:["ul:has(li [data-anchor-send-message])"],linkedinCheckbox:['.artdeco-list__item input[type="checkbox"]'],linkedinCheckboxChecked:['.artdeco-list__item input[type="checkbox"]:checked'],linkedinCheckbox2:['[data-scroll-into-view] input[type="checkbox"]'],linkedinCheckboxSelectAll:['input[id^="multi-selector-checkbox-ember"]','li input#bulk-actions-select[type="checkbox"]'],lemlistAlreadyInCampaignTagContainer:[".artdeco-list__item ul:has(li [data-anchor-send-message])"],lemlistHeaderContainer:["div:has(+ #search-results-container)"],entityLockup:[".artdeco-entity-lockup"],listItem:[".artdeco-list__item"],checkbox:['input[type="checkbox"]'],listItemArticle:[".artdeco-list__item article"],dataScrollIntoView:["[data-scroll-into-view]"],leadSearchResults:['[data-sn-view-name="module-lead-search-results"]'],completeCheckboxes:['[data-scroll-into-view]:has(+:not(:is(article))) input[type="checkbox"]'],incompleteCheckboxes:['[data-scroll-into-view]:has(+article) input[type="checkbox"]'],profileSideContainer:["#inline-sidesheet-outlet"],linkedinSearchPageContainer:[".lemlist-header + #search-results-container"],howToContainer:["header.application-header"],howToScrollToElement:[".lemlist-header"],selectAllCheckbox:[".lemlist-checkbox-all"],selectAllCheckboxLabel:["span.lemlist-select-all-text"],selectCheckboxChecked:[".lemlist-checkbox:not(.lemlist-checkbox-all).checked"],paginationControls:[".artdeco-pagination"]},searchPeoplePage:{searchEntityResult:['[data-view-name="search-entity-result-universal-template"]'],linkedinUrl:['a[data-test-app-aware-link][href^="https://www.linkedin.com/in/"]','a[data-view-name="search-result-lockup-title"]','a[href^="https://www.linkedin.com/in/"]'],image:["a>div>div>figure>img, a>div>div>figure>svg, .presence-entity img"],userOccupation:['p:has(a[data-view-name="search-result-lockup-title"]) + p',".entity-result__primary-subtitle",".entity-result__divider > div div:nth-child(2)","div>div>div:nth-child(2)>div>div:nth-child(2)","figure + div p:nth-child(2)"],fullName:[".entity-result__title-text a span>span",".entity-result__title-line a span>span",".entity-result__title-line span>a>span>span","a:has(+.entity-result__badge)>span>span",".linked-area div:nth-child(2) > div:first-child > div.t-roman.t-sans a",'a[data-view-name="search-result-lockup-title"]','p a[href^="https://www.linkedin.com/in/"]'],resultList:[".search-results-container>div:has(.reusable-search__result-container)"],actionsDiv:[".entity-result__actions",".linked-area > div > div:last-child",'div:has(>div[data-view-name="relationship-building-button"])',"div:has(>figure) > div:last-child"],validResult:["[data-chameleon-result-urn] , .reusable-search__result-container"],searchResult:[".search-results-container li:has(>[data-chameleon-result-urn])",'[data-view-name="people-search-result"]','[data-sdui-screen="com.linkedin.sdui.flagshipnav.search.SearchResultsPeople"] [role="list"] [role="listitem"] > div[data-display-contents="true"]:has(a[href^="https://www.linkedin.com/in/"])'],searchResultsContainer:[".search-results-container",'[role="main"] div:has(>hr[role="presentation"])','[data-sdui-screen="com.linkedin.sdui.flagshipnav.search.SearchResultsPeople"] [data-testid="lazy-column"]','[data-sdui-screen="com.linkedin.sdui.flagshipnav.search.SearchResultsPeople"] [role="list"]'],searchResultsContainerParent:['div[componentkey="SemanticPeopleSearchResultsPEOPLE_SEARCH"]','[data-sdui-screen="com.linkedin.sdui.flagshipnav.search.SearchResultsPeople"] [data-testid="lazy-column"]'],searchResultsContainerRemovedParent:['div[data-sdui-component="com.linkedin.sdui.generated.search.dsl.impl.spsInvokePserpAfterReasoning"]'],mainLayoutLeft:[".search-marvel-srp",'[role="main"] div:has(hr)>div>div','[data-sdui-screen="com.linkedin.sdui.flagshipnav.search.SearchResultsPeople"] section'],howToContainer:[".hasLegacyFeedLineHeight div:has(main)",".authentication-outlet"],howToScrollToElement:[".lemlist-header"],selectAllCheckbox:[".lemlist-checkbox-all"],selectAllCheckboxLabel:["span.lemlist-select-all-text"],selectCheckboxChecked:[".lemlist-checkbox:not(.lemlist-checkbox-all).checked"],paginationControls:['[data-testid="pagination-controls-list"]',".artdeco-pagination"],peopleButton:['div[data-view-name="search-filters"] label',"nav ul.search-reusables__filter-list>li>button",'[componentkey="SearchResults_SearchResultsFilterBar"] label']},searchAllPage:{peopleButton:['div[data-view-name="search-filters"] label',"nav ul.search-reusables__filter-list>li>button",'[componentkey="SearchResults_SearchResultsFilterBar"] label'],toolbar:[".scaffold-layout-toolbar"]},linkedinComposerPage:{composerWrapper:[".msg-convo-wrapper"],textareaSelector:[".msg-form__contenteditable"],footer:[".msg-form__message-texteditor"],messagingOverlay:["#msg-overlay"],form:[".msg-form"],formContainer:["form.msg-form.msg-form--thread-footer-feature"],composerEvent:[".msg-s-event-listitem"],composerEventBody:[".msg-s-event-listitem__body"],composerEventName:[".msg-s-message-group__name"],composerEventDate:[".msg-s-message-group__timestamp"],interOPOutlet:["#interop-outlet"]},hubspot:{tableExternalId:["[data-table-external-id]"],avatarDisplay:['[data-test-id="AvatarDisplay-switchComponent"]'],flexContainer:['[class*="Flex__StyledFlex"]'],frameworkDataTable:['[data-test-id="framework-data-table"]'],companyAssocCard:['[data-card-type="ASSOCIATION_TABLE"]'],avatarContainerClass:["AvatarContainer__AvatarWrapper-"],privateButtonClasses:["PrivateButton__StyledButton-eRHhiA","jzJlvZ"],leadRowCell:['[data-table-external-id^="cell-0-136-"]'],leadPrimaryContactLink:['[data-test-id^="association-link-0-1-"]'],leadPrimaryContactHeader:['[data-table-external-id="header-0-136-associations.0-578"]']},gmail:{userEmailElm:[".gb_A.gb_Xa.gb_Z"],userEmailElmFallback:[".gb_Bc .gb_g + div"]},gmailComposerPage:{gmailComposerForm:["form input[name=composeid]"],gmailComposer:["div.M9"],previousMessagesButton:[".ajR"],previousMessages:[".gmail_quote_container blockquote"],lemlistActionBar:[".gmail-action-bar"],lemlistActionBarAskAIElements:[".gmail-ask-ai-elements"],lemlistActionBarTemplatesButton:[".gmail-action-bar .templates"],previousEmail:['form > input[name="rm"]'],body:[".editable.LW-avf"]},gmailSidebarPage:{appIconsContainer:['div[role="tablist"]'],appIconsActiveIcon:["div[role=tablist] div[data-guest-app-id].aT5-aOt-I-KO .aT5-aOt-I-JX-Jw"],appIcons:['div[role="tablist"] div[data-guest-app-id]']},gmailEmailPage:{topBarDate:[".gH.bAk",".gH.VYc0jb"],body:[".a3s.aiL > div[dir]"]}};function R(e,t,n){switch(n){case"all":var i=e.querySelectorAll(t);return i.length>0?Array.from(i):null;case"closest":return e instanceof HTMLElement?e.closest(t):null;default:return e.querySelector(t)}}function U(e){var t=e.page,n=e.key,i=e.container,r=e.mode;null!=i||(i=document);for(var o,a,l=f(t&&n?M[(o={page:t,key:n}).page][o.key]:[e.selector]);!(a=l()).done;){var s=R(i,a.value,r);if(s)return s}return null}function z(e){if(!e)return"";var t=document.createElement("textarea");return t.innerHTML=e,t.value.trim()}function D(){var e,t,n,i,r,o,a,l=window.location.href.includes("linkedin.com/sales")?"salesNavProfilePage":"profilePage";function s(e){return U({page:l,key:e,container:document})}var c=null==(e=s("userName"))?void 0:e.innerText;if(!c)return console.error("extractUserInfos: no userName found"),{};var u,d=null==(t=s("userPicture"))?void 0:t.src,h=null==(n=s("userOccupation"))?void 0:n.innerHTML,m=null==(i=s("companyName"))?void 0:i.innerText,p=null==(r=s("companyLogo"))?void 0:r.src,f=null==(o=s("location"))?void 0:o.innerText;return"salesNavProfilePage"===l&&(u=/linkedin\.com\/sales\/lead/i.test(window.location.href)?window.location.href:null==(a=s("profileUrl"))?void 0:a.href),{name:z(c),profileUrl:u,picture:d,occupation:z(h),companyName:m,companyPicture:p,location:f}}var B,K,H={"":0,chrome:1,"chrome-extension":2,"view-source":3,ftp:4,file:5,data:6,blob:7,about:8};function W(e){void 0===e&&(e="");var t="",n=e.split("#")[0].toLocaleLowerCase();return/^https\:\/\/(www|.{2})\.linkedin\.com\/in\/[^/?]+(\/recent-activity\/|\/details\/|\/overlay\/|\/?\?[^/]*|\/?$)/.test(n)||/^https\:\/\/(www|.{2})\.linkedin\.com\/sales\/people\/(.+?),/.test(n)||/^https\:\/\/(www|.{2})\.linkedin\.com\/sales\/(profile|lead)\/([^,]{39}),/.test(n)?t="profile":n.includes("linkedin.com/feed")?t="feed":n.includes("linkedin.com/posts/")?t="post":n.includes("linkedin.com/login")||n.includes("linkedin.com/checkpoint")||n.includes("linkedin.com/authwall")?t="login":n.includes("linkedin.com/company/")?t="company":n.includes("linkedin.com/messaging/thread/")?t="messages":n.includes("linkedin.com/search/results/people/?")||n.includes("linkedin.com/sales/search/people")?t="search-people":n.includes("linkedin.com/search/results/all")?t="search-all":n.includes("linkedin.com/mynetwork/")&&(t="connections"),t}function F(e){var t;void 0===e&&(e="");var n=((e=e||(null==(t=window.top)?void 0:t.location.href)||document.URL).match(/linkedin\.com\/in\/([^?/]+)/)||[])[1]||(e.match(/linkedin\.com\/sales\/people\/(.+?),/)||[])[1]||(e.match(/linkedin\.com\/sales\/(?:profile|lead)\/([^,]{39}),/)||[])[1]||"";return decodeURIComponent(n)}function G(e){var t;void 0===e&&(e="");var n=((e=e||(null==(t=window.top)?void 0:t.location.href)||document.URL).match(/linkedin\.com\/company\/([^?/]+)/)||[])[1]||"";return decodeURIComponent(n)}function V(e){if(e){var t=e.match(/:(\d+)$/);return t?t[1]:void 0}}function J(e){if(e){var t=e.match(/,(\d+)\)$/);return t?t[1]:void 0}}function X(e){if(null!=e&&e.year)return{year:e.year,month:e.month}}function Y(e,t,n){if(!e||0===Object.keys(e).length)return n||"";if(t&&e[t])return e[t];var i=Object.keys(e),r=i.find(function(e){return e.startsWith("en")});return r?e[r]:e[i[0]]||n||""}function q(e,t){if(!e||!t)return{};for(var n={},i=0,r=Object.entries(e);i<r.length;i++){var o=r[i],a=o[0],l=o[1];a!==t&&l&&(n[a]=l)}return n}function $(e){return Q(e)}function Q(e){var t,n,i;if(e){var r=(e.rootUrl&&e.artifacts?e:null)||e.vectorImage||(null==(t=e.image)?void 0:t["com.linkedin.common.VectorImage"])||e["com.linkedin.common.VectorImage"]||(null==(n=e.displayImageReference)?void 0:n.vectorImage);if(null!=r&&r.rootUrl&&null!=r&&null!=(i=r.artifacts)&&i.length){var o=r.artifacts,a=o.reduce(function(e,t){return((null==t?void 0:t.width)||0)>((null==e?void 0:e.width)||0)?t:e},o[0]);if(null!=a&&a.fileIdentifyingUrlPathSegment)return r.rootUrl+a.fileIdentifyingUrlPathSegment}}}exports.ContactInfoSource=void 0,(B=exports.ContactInfoSource||(exports.ContactInfoSource={})).PUBLIC="public",B.MANUAL="manual",B.APOLLO="apollo",B.LUSHA="lusha",B.HUNTER="hunter",B.ROCKETREACH="rocketreach",B.SNOV="snov",B.CLEARBIT="clearbit",exports.QueryType=void 0,(K=exports.QueryType||(exports.QueryType={})).EMAIL="email",K.PHONE="phone",K.BOTH="both",exports.ChromeStore=T,exports.Draggable=_,exports.KeyedMutex=k,exports.MemoryStore=P,exports.Mutex=b,exports.RealUndefined=e,exports.WebStore=O,exports.cacheWrapper=function(e,t){void 0===t&&(t=d);var n=function(){var n=[].slice.call(arguments),o=i(n)+e.name+(t.identifier||"");if(u(o))return Promise.resolve(r(c(o)));if(s[o]){var a=Object.assign({},d,t);return new Promise(function(e){var t=Date.now(),n=setInterval(function(){u(o)?(clearInterval(n),e(r(c(o)))):Date.now()-t>a.timeout&&(s[o]=!1,clearInterval(n),e(r(a.timeoutResult)))},100)})}return s[o]=!0,e.apply(this,n).then(function(e){return l[o]=e,r(l[o])}).catch(function(e){throw e}).finally(function(){s[o]=!1})};return Object.defineProperty(n,"name",{value:"cacheWrapper_"+e.name,configurable:!0}),n},exports.cloneDeep=r,exports.coalesce=function(e,t){var n;void 0===t&&(t={});var i=new Map,r=null!=(n=t.key)?n:function(){return""},o=t.onError,a=function(){var t=[].slice.call(arguments),n=r.apply(void 0,t),a=i.get(n);if(a)return a.pending=t,a.hasPending=!0,a.running;var l={running:Promise.resolve(),pending:null,hasPending:!1};return i.set(n,l),l.running=Promise.resolve().then(function(){return function(t,n,r){try{var a=function(){i.delete(t)},l=r,s=function(e,t,n){for(var i;;){var r=e();if(x(r)&&(r=r.v),!r)return o;if(r.then){i=0;break}var o=n();if(o&&o.then){if(!x(o)){i=1;break}o=o.s}}var a=new C,l=w.bind(null,a,2);return(0===i?r.then(c):1===i?o.then(s):(void 0).then(function(){(r=e())?r.then?r.then(c).then(void 0,l):c(r):w(a,1,o)})).then(void 0,l),a;function s(t){o=t;do{if(!(r=e())||x(r)&&!r.v)return void w(a,1,o);if(r.then)return void r.then(c).then(void 0,l);x(o=n())&&(o=o.v)}while(!o||!o.then);o.then(s).then(void 0,l)}function c(e){e?(o=n())&&o.then?o.then(s).then(void 0,l):s(o):w(a,1,o)}}(function(){return!!l},0,function(){function t(){l=n.pending,n.pending=null,n.hasPending=!1}var i=function(t,n){try{var i=Promise.resolve(e.apply(void 0,l)).then(function(){})}catch(e){return n(e)}return i&&i.then?i.then(void 0,n):i}(0,function(e){!function(e,t){if(o)try{o(e,t)}catch(e){}}(e,l)});return i&&i.then?i.then(t):t()});return Promise.resolve(s&&s.then?s.then(a):a())}catch(e){return Promise.reject(e)}}(n,l,t)}),l.running};return a.isRunning=function(){return i.has(r.apply(void 0,[].slice.call(arguments)))},a.hasPending=function(){var e,t;return null!=(e=null==(t=i.get(r.apply(void 0,[].slice.call(arguments))))?void 0:t.hasPending)&&e},Object.defineProperty(a,"size",{get:function(){return i.size}}),a},exports.createDefaultObject=o,exports.createElement=function e(t){var n=void 0===t?{}:t,i=n.tag,r=n.children,o=void 0===r?[]:r,a=n.props,l=void 0===a?{}:a,s=n.attrs,c=void 0===s?{}:s,u=n.styles,d=void 0===u?{}:u,h=document.createElement(void 0===i?"div":i);Object.assign(h,l);for(var m=0,p=Object.entries(c);m<p.length;m++){var v=p[m],g=v[1];!1!==g&&h.setAttribute(v[0],g)}for(var y=0,b=Object.entries(d);y<b.length;y++){var k=b[y];S(h,k[0],k[1])}for(var w,C=f(Array.isArray(o)?o:[o]);!(w=C()).done;){var x=w.value;x&&("object"==typeof x?x instanceof Element?h.appendChild(x):h.appendChild(e(x)):h.appendChild(document.createTextNode(x)))}return h},exports.createMessageBus=function(e){void 0===e&&(e={});var t=e.debug,n=void 0!==t&&t,i=e.logPrefix,r=void 0===i?"[MessageBus]":i,o=new Map,a=!1;function l(e){var t;n&&(t=console).error.apply(t,[r+" "+e].concat([].slice.call(arguments,1)))}function s(){a||(chrome.runtime.onMessage.addListener(function(e,t,n){if(e&&"string"==typeof e.type){var i=o.get(e.type);if(i)try{var r=i(e.payload,t);return r instanceof Promise?(r.then(n).catch(function(t){l('Error handling "'+String(e.type)+'":',t),n({__error:!0,message:t instanceof Error?t.message:String(t)})}),!0):(n(r),!1)}catch(t){return l('Error handling "'+String(e.type)+'":',t),n({__error:!0,message:t instanceof Error?t.message:String(t)}),!1}}}),a=!0)}return{send:function(e){return chrome.runtime.sendMessage({type:e,payload:[].slice.call(arguments,1)[0]})},sendToTab:function(e,t){return chrome.tabs.sendMessage(e,{type:t,payload:[].slice.call(arguments,2)[0]})},on:function(e,t){return s(),o.set(e,t),function(){o.delete(e)}},onMany:function(e){s();for(var t=[],n=0,i=Object.entries(e);n<i.length;n++){var r=i[n],a=r[0],l=r[1];l&&(o.set(a,l),t.push(a))}return function(){for(var e=0,n=t;e<n.length;e++)o.delete(n[e])}},hasHandler:function(e){return o.has(e)},getRegisteredTypes:function(){return Array.from(o.keys())},clearAllHandlers:function(){o.clear()}}},exports.createSvg=function(e){return"string"==typeof e?I(e):L(e)},exports.createSvgFromUrl=function(e){try{return Promise.resolve(function(t,n){try{var i=Promise.resolve(fetch(e)).then(function(e){if(!e.ok)throw new Error("网络请求失败: "+e.status+" "+e.statusText);return Promise.resolve(e.text()).then(I)})}catch(e){return n(e)}return i&&i.then?i.then(void 0,n):i}(0,function(e){var t=e instanceof Error?e.message:"未知错误";throw new Error("无法创建 SVG 元素: "+t)}))}catch(e){return Promise.reject(e)}},exports.debounce=function(e,t){var n=null;return function(){var i=arguments,r=this;null!==n&&clearTimeout(n),n=setTimeout(function(){e.apply(r,[].slice.call(i)),n=null},t)}},exports.decodeJWT=function(e){var t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=decodeURIComponent(atob(t).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(n)},exports.delayExecution=function(e,t){void 0===t&&(t=0);var n=[].slice.call(arguments,2);return new Promise(function(i){0===t?i(e.apply(void 0,n)):setTimeout(function(){i(e.apply(void 0,n))},t)})},exports.exposeLinkedinDebugHelpers=function(){"undefined"!=typeof window&&(window.getContactInfo=D,window.getElement=U)},exports.extractCompaniesFromRawProfile=function(e){var t,n=new Map;return null==(t=e.profilePositionGroups)||null==(t=t.elements)||t.forEach(function(e){var t;[e.company].concat((null==(t=e.profilePositionInPositionGroup)||null==(t=t.elements)?void 0:t.map(function(e){return e.company}))||[]).filter(Boolean).forEach(function(e){var t,i=V(e.entityUrn);if(i&&!n.has(i)){var r;if(e.industry&&null!=(t=e.industryUrns)&&t.length){var o=e.industry[e.industryUrns[0]];r=null==o?void 0:o.name}n.set(i,{linkedinId:i,universalName:e.universalName,name:e.name||"",industry:r,employeeCountRange:e.employeeCountRange?{start:e.employeeCountRange.start,end:e.employeeCountRange.end}:void 0,logoUrl:$(e.logo)})}})}),Array.from(n.values())},exports.generateStableUniqueKey=i,exports.getCompanyPublicId=G,exports.getContactInfo=D,exports.getCookie=function(e,t,n){return void 0===n&&(n=!1),chrome.cookies.get({url:e,name:t}).then(function(e){var t;return n?(null==e||null==(t=e.value)?void 0:t.replace(/"/g,""))||"":null!=e?e:void 0})},exports.getCookies=function(e,t){return void 0===t&&(t=!1),chrome.cookies.getAll({url:e}).then(function(e){return t?function(e){return e.map(function(e){return e.name+"="+e.value}).join("; ")}(e):e})},exports.getElement=U,exports.getExtensionInfo=function(){var e,t,n;return{locale:null==(e=chrome.i18n)?void 0:e.getUILanguage(),extId:null==(t=chrome.runtime)?void 0:t.id,version:null==(n=chrome.runtime)?void 0:n.getManifest().version}},exports.getGlobal=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:this},exports.getLinkedinCompany=function(e,t){var n=t.csrfToken,i=t.cookies;try{var r="string"==typeof e?{universalName:e}:e,o="universalName"in r,a=A+"/organization/companies"+(o?"?q=universalName&universalName="+r.universalName:"/"+r.urn),l=N(n,i);return Promise.resolve(fetch(a,{method:"GET",headers:l}).then(function(e){try{var t,n=function(){if(e.ok)return Promise.resolve(e.json()).then(function(e){if(o){var n,i=(null==(n=e.elements)?void 0:n[0])||null;return t=1,i}return t=1,e})}();return Promise.resolve(n&&n.then?n.then(function(e){return t?e:null}):t?n:null)}catch(e){return Promise.reject(e)}}).catch(function(e){return console.error(e),null}))}catch(e){return Promise.reject(e)}},exports.getLinkedinMe=function(e){var t=e.csrfToken,n=e.cookies;try{var i=A+"/me",r=N(t,n);return Promise.resolve(fetch(i,{method:"GET",headers:r}).then(function(e){try{return Promise.resolve(e.ok?e.json():null)}catch(e){return Promise.reject(e)}}).catch(function(e){return console.error(e),null}))}catch(e){return Promise.reject(e)}},exports.getLinkedinPageType=W,exports.getLinkedinProfile=function(e,t){var n=t.csrfToken,i=t.cookies;try{var r=A+"/identity/dash/profiles?q=memberIdentity&memberIdentity="+e+"&decorationId=com.linkedin.voyager.dash.deco.identity.profile.FullProfileWithEntities-26",o=N(n,i);return Promise.resolve(fetch(r,{method:"GET",headers:o}).then(function(e){try{var t,n=function(){if(e.ok)return Promise.resolve(e.json()).then(function(e){var n,i=(null==(n=e.elements)?void 0:n[0])||null;return t=1,i})}();return Promise.resolve(n&&n.then?n.then(function(e){return t?e:null}):t?n:null)}catch(e){return Promise.reject(e)}}).catch(function(e){return console.error(e),null}))}catch(e){return Promise.reject(e)}},exports.getLinkedinPublicId=function(e){var t;return void 0===e&&(e=""),F(e=e||(null==(t=window.top)?void 0:t.location.href)||document.URL)||G(e)||""},exports.getPageType=function(e){if(void 0===e&&(e=""),!e)return"";var t=Object.keys(H),n=new URL(e).protocol.replace(":","");return t.includes(n)?n:W(e)},exports.getPostPublicId=function(e){var t;void 0===e&&(e="");var n=((e=e||(null==(t=window.top)?void 0:t.location.href)||document.URL).match(/linkedin\.com\/posts\/([^\/]+)\//)||[])[1]||"";return decodeURIComponent(n)},exports.getProfilePublicId=F,exports.isCloneable=t,exports.isEqual=a,exports.isErrorResponse=function(e){return"object"==typeof e&&null!==e&&"__error"in e&&!0===e.__error},exports.isLinkedInUrl=function(e){return/^https?:\/\/(www|.{2})\.linkedin\.com/.test(e)},exports.isPrimitive=n,exports.launchWebAuthFlow=function(e){var t=e.clientId,n=e.responseType,i=void 0===n?"code":n,r=e.state,o=e.nonce,a=e.interactive,l=void 0===a||a;try{var s=chrome.identity.getRedirectURL(),c=Array.isArray(i)?i:[i],u=new URL("https://accounts.google.com/o/oauth2/v2/auth");return u.searchParams.set("client_id",t),u.searchParams.set("redirect_uri",s),u.searchParams.set("response_type",c.join(" ")),u.searchParams.set("scope","openid email profile"),o&&u.searchParams.set("nonce",o),r&&u.searchParams.set("state",r),Promise.resolve(chrome.identity.launchWebAuthFlow({url:u.toString(),interactive:l}).then(function(e){if(!e)return Promise.reject(new Error("redirectUrl is null"));var t=e.includes("?")?"?":"#",n=new URLSearchParams(e.split(t)[1]),i={};return n.forEach(function(e,t){i[t]=e}),i}).catch(function(e){return console.log("error",e),Promise.reject(e)}))}catch(e){return Promise.reject(e)}},exports.pageTypeMap=H,exports.scrollToBottom=E,exports.scrollToBottomIfNeeded=function(e){e&&("true"!==e.dataset.isListeningForUserScroll&&(function(e){e&&e.addEventListener("scroll",function(){!function(e,t){e.dataset.userInteracted=t?"true":"false"}(e,e.scrollTop+e.clientHeight<e.scrollHeight-5)})}(e),e.dataset.isListeningForUserScroll="true"),"true"!==e.dataset.userInteracted&&E(e))},exports.serialize=function(e,t){var n;void 0===t&&(t={});var i=new k,r=null!=(n=t.key)?n:function(){return""};return function(){var t=[].slice.call(arguments);return i.run(r.apply(void 0,t),function(){return e.apply(void 0,t)})}},exports.singleExecutionWrapper=function(t,n){void 0===n&&(n=0);var i=function(){if(i.isExecuting)return Promise.resolve(e);i.isExecuting=!0;var r,o=performance.now(),a=function(){var e=performance.now()-o;n&&n>e?setTimeout(function(){i.isExecuting=!1},n-e):i.isExecuting=!1};try{r=Promise.resolve(t.apply(this,[].slice.call(arguments)))}catch(e){return a(),Promise.reject(e)}return r.then(a,a),r};return i.isExecuting=!1,i},exports.singleFlight=function(e,t){var n;void 0===t&&(t={});var i=new Map,r=null!=(n=t.key)?n:function(){return""},o=function(){var t=[].slice.call(arguments),n=r.apply(void 0,t),o=i.get(n);if(o)return o;var a=function(e,t){try{return Promise.resolve(e.apply(void 0,t))}catch(e){return Promise.reject(e)}}(e,t).finally(function(){i.delete(n)});return i.set(n,a),a};return o.isRunning=function(){return i.has(r.apply(void 0,[].slice.call(arguments)))},Object.defineProperty(o,"size",{get:function(){return i.size}}),o},exports.transformRawCompany=function(e){var t,n,i,r,o,a,l,s,c,u,d=(null==(t=e.elements)?void 0:t[0])||e,h=V(d.entityUrn);if(!h)throw new Error("Cannot extract linkedinId from company data");for(var m,p=(null!=(n=d.defaultLocale)&&n.language&&null!=(i=d.defaultLocale)&&i.country?d.defaultLocale.language+"_"+d.defaultLocale.country:null)||(null!=(r=d.multiLocaleNames)&&r.localized?Object.keys(d.multiLocaleNames.localized)[0]:null)||"en_US",v=null==(o=d.multiLocaleNames)?void 0:o.localized,g=Y(v,p,d.name),y=null==(a=d.multiLocaleDescriptions)?void 0:a.localized,b=Y(y,p,"string"==typeof d.description?d.description:void 0)||void 0,k={},w=q(v,p),C=q(y,p),x=new Set([].concat(Object.keys(w),Object.keys(C))),P=f(x);!(m=P()).done;){var S=m.value,L={};w[S]&&(L.name=w[S]),C[S]&&(L.description=C[S]),Object.keys(L).length>0&&(k[S]=L)}var I=d.headquarter||(null==(l=d.confirmedLocations)?void 0:l.find(function(e){return e.headquarter})),E=Q(d.logo)||Q(null==(s=d.logos)?void 0:s.logo),_=Q(d.backgroundCoverImage),O=d.jobSearchPageUrl||void 0,j=null==(c=d.companyIndustries)||null==(c=c[0])?void 0:c.localizedName,T=x.size>0?[p].concat(Array.from(x)):void 0;return{linkedinId:h,universalName:d.universalName,name:g,description:b,industry:j,employeeCountRange:d.staffCount?{start:d.staffCount,end:d.staffCount}:d.staffCountRange?{start:d.staffCountRange.start,end:d.staffCountRange.end}:void 0,headquarters:I?{country:I.country,city:I.city,geographicArea:I.geographicArea,postalCode:I.postalCode,line1:I.line1}:void 0,logoUrl:E,backgroundCoverUrl:_,specialities:d.specialities,companyType:d.type,foundedYear:null==(u=d.foundedOn)?void 0:u.year,websiteUrl:d.companyPageUrl,jobSearchPageUrl:O,primaryLocale:p,supportedLocales:T,translations:Object.keys(k).length>0?k:void 0}},exports.transformRawProfile=function(e){var t,n,i,r,o,a,l,s,c=V(e.objectUrn);if(!c)throw new Error("Cannot extract memberId from rawProfile");for(var u,d=function(e){if(e)return e.language+"_"+e.country}(e.primaryLocale),h=function(e){if(null!=e&&e.length)return e.map(function(e){return e.language+"_"+e.country})}(e.supportedLocales),m=Y(e.multiLocaleFirstName,d,e.firstName),p=Y(e.multiLocaleLastName,d,e.lastName),v=Y(e.multiLocaleHeadline,d,e.headline),g=Y(e.multiLocaleSummary,d,e.summary),y={},b=(null==h?void 0:h.filter(function(e){return e!==d}))||[],k=f(b);!(u=k()).done;){var w,C,x,P,S=u.value,L={},I=null==(w=e.multiLocaleFirstName)?void 0:w[S],E=null==(C=e.multiLocaleLastName)?void 0:C[S],_=null==(x=e.multiLocaleHeadline)?void 0:x[S],O=null==(P=e.multiLocaleSummary)?void 0:P[S];I&&(L.firstName=I),E&&(L.lastName=E),_&&(L.headline=_),O&&(L.summary=O),Object.keys(L).length>0&&(y[S]=L)}var j=(null==(t=e.profileSkills)||null==(t=t.elements)?void 0:t.map(function(e){return e.name}))||[],T=(null==(n=e.profileLanguages)||null==(n=n.elements)?void 0:n.map(function(e){return{name:e.name,proficiency:e.proficiency}}))||[],A=(null==(i=e.profileHonors)||null==(i=i.elements)?void 0:i.map(function(e){return{title:e.title,issuer:e.issuer,issuedOn:X(e.issuedOn)}}))||[],N=(null==(r=e.profileEducations)||null==(r=r.elements)?void 0:r.map(function(e){var t,n,i;return{school:Y(e.multiLocaleSchoolName,d,e.schoolName||(null==(t=e.school)?void 0:t.name)),degree:Y(e.multiLocaleDegreeName,d,e.degreeName)||void 0,fieldOfStudy:Y(e.multiLocaleFieldOfStudy,d,e.fieldOfStudy)||void 0,startDate:X(null==(n=e.dateRange)?void 0:n.start),endDate:X(null==(i=e.dateRange)?void 0:i.end)}}))||[],M=(null==(o=e.profileCertifications)||null==(o=o.elements)?void 0:o.map(function(e){var t,n;return{name:Y(e.multiLocaleName,d,e.name),authority:Y(e.multiLocaleAuthority,d,e.authority)||void 0,startDate:X(null==(t=e.dateRange)?void 0:t.start),endDate:X(null==(n=e.dateRange)?void 0:n.end),licenseNumber:e.licenseNumber,url:e.url}}))||[],R=[];null==(a=e.profilePositionGroups)||null==(a=a.elements)||a.forEach(function(e){var t;((null==(t=e.profilePositionInPositionGroup)?void 0:t.elements)||[]).forEach(function(t){for(var n,i,r,o,a,l,s=t.company||e.company,c=V(t.companyUrn||(null==s?void 0:s.entityUrn)),u=Y(t.multiLocaleTitle,d,t.title),h=Y(t.multiLocaleCompanyName,d,t.companyName||(null==s?void 0:s.name)),m=Y(t.multiLocaleDescription,d,t.description)||void 0,p={},v=f(b);!(a=v()).done;){var g,y,k,w=a.value,C={},x=null==(g=t.multiLocaleTitle)?void 0:g[w],P=null==(y=t.multiLocaleDescription)?void 0:y[w],S=null==(k=t.multiLocaleCompanyName)?void 0:k[w];x&&(C.title=x),P&&(C.description=P),S&&(C.companyName=S),Object.keys(C).length>0&&(p[w]=C)}if(null!=s&&s.industry&&null!=s&&null!=(n=s.industryUrns)&&n.length){var L=s.industry[s.industryUrns[0]];l=null==L?void 0:L.name}R.push({linkedinPositionId:J(t.entityUrn),companyName:h,companyLinkedinId:c,companyUniversalName:null==s?void 0:s.universalName,title:u,description:m,startDate:X(null==(i=t.dateRange)?void 0:i.start),endDate:X(null==(r=t.dateRange)?void 0:r.end),isCurrent:!(null!=(o=t.dateRange)&&o.end),companyLogoUrl:$(null==s?void 0:s.logo),companyIndustry:l,companyEmployeeCountRange:null!=s&&s.employeeCountRange?{start:s.employeeCountRange.start,end:s.employeeCountRange.end}:void 0,translations:Object.keys(p).length>0?p:void 0})})});var U,z,D=(null==(l=e.geoLocation)||null==(l=l.geo)?void 0:l.defaultLocalizedName)||void 0,B=null==(s=e.industry)?void 0:s.name;return{memberId:c,publicIdentifier:e.publicIdentifier,firstName:m,lastName:p,headline:v||void 0,summary:g||void 0,location:D,pictureUrl:(z=e.profilePicture,Q(z)),backgroundPictureUrl:(U=e.backgroundPicture,Q(U)),isPremium:!0===e.premium,industry:B,primaryLocale:d,supportedLocales:h,skills:j,languages:T.length>0?T:void 0,honors:A.length>0?A:void 0,educations:N.length>0?N:void 0,certifications:M.length>0?M:void 0,positions:R.length>0?R:void 0,translations:Object.keys(y).length>0?y:void 0}};
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|