PageSourceSearch

https://insurceo.com/_nuxt/CIMk-skB.js

js insurceo.com collected 2026-10-08 03:29:32 UTC 5,680 bytes, 1 lines download raw bytes

1import{X as e}from"./CcKBnQZd.js";import{Er as t,Ot as n,S as r,Sn as i,Tt as a,Xn as o,gn as s,o as c,wt as l,xr as u}from"./tCqEpUva.js";function d(e,t){return i(),n(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[a(`path`,{"fill-rule":`evenodd`,d:`M11.78 5.22a.75.75 0 0 1 0 1.06L8.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z`,"clip-rule":`evenodd`})])}function f(e,t){return i(),n(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[a(`path`,{"fill-rule":`evenodd`,d:`M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z`,"clip-rule":`evenodd`})])}function p(e,t){return i(),n(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[a(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M6 18 18 6M6 6l12 12`})])}var m=.05;function h(e){return(Array.isArray(e)?e:String(e??``).split(/[;,]/)).map(e=>String(e??``).trim()).filter(Boolean)}function g(e){return e.map(e=>({...e,value:String(e.activity_id),text:e.activity,from:e.from}))}var _=new Set([`value`,`text`,`img`,`tooltip`,`exclusive`]);function v(e){return e.map(e=>{let t=e.activity_id??e.value??``,n=typeof e.text==`string`&&e.text!==``?e.text:String(e.activity??``),r=typeof e.from==`string`?e.from:`fuzzy`;return{...Object.fromEntries(Object.entries(e).filter(([e])=>!_.has(e))),activity_id:t,activity:n,from:r}})}function y(e,t){return e.find(e=>String(e.value??``)===t)}function b(e,t){if(e==null||e===``)return null;let n=y(t,String(e));if(!n||typeof n.from!=`string`)return null;let r=v([n])[0];return r?{...r,from:`selected`}:null}var x=`810`,S=[`ninguna de las anteriores`,`no encuentro mi actividad`];function C(e,t){return String(e).trim()===x||S.includes(t.trim().toLowerCase())}function w(e,t=0){return e.reduce((e,n)=>{let r=n.from;e[r]||(e[r]=[]);let i=e[r].length;return e[r].push({id:n.activity_id,text:n.activity,showAsSkeleton:!1,animateDelay:`${(t+i)*m}s`,isNinguna:C(n.activity_id,n.activity),sector:typeof n.sector==`string`?n.sector:``,isIa:r===`ia`}),e},{})}var T={id:`skeleton`,text:``,showAsSkeleton:!0,animateDelay:`0s`,isNinguna:!1,sector:``,isIa:!1};function E(e){return e.filter(e=>!e.isNinguna)}function D(e,t){return E(e).slice(0,t).map((e,t)=>({...e,animateDelay:`${t%5*m}s`}))}function O(e){for(let t of Object.values(e)){let e=t.find(e=>e.isNinguna);if(e)return e}return null}function k(e,t){return Math.max(0,E(e).length-t)}function A(e,t,n,r,i){if(e!=null&&e!==``){let n=y(i,String(e));return w([{activity_id:e,activity:t||String(e),sector:typeof n?.sector==`string`?n.sector:``,from:`selected`}])}return n&&!r?{skeleton:[T]}:w(v(i))}function j(e){let n=t({});function r(e){return n.value[e]??5}let i=l(()=>Object.fromEntries(Object.entries(e.value).map(([e,t])=>[e,D(t,r(e))]))),a=l(()=>{let e=i.value,t=e.ia??[],n=Object.entries(e).filter(([e])=>e!==`ia`).flatMap(([,e])=>e);return[...t,...n]}),o=l(()=>O(e.value));function s(t){return k(e.value[t]??[],r(t))}let c=l(()=>Object.keys(e.value).reduce((e,t)=>e+s(t),0));function u(){for(let t of Object.keys(e.value))s(t)>0&&d(t)}function d(e){n.value={...n.value,[e]:r(e)+5}}function f(){n.value={}}return{rowsForTemplate:i,flatRows:a,ningunaRow:o,hiddenRowsCount:s,hiddenRowsTotal:c,showMoreRows:d,showMoreAllRows:u,resetRowsPaging:f}}function M(n,i,a,d,{companiesMock:f=!1}={}){let p=r(),{locale:m}=e(),_=t(!1),v=t(!1),y=l(()=>d.options[i.value]??[]),b=null,x=null,S=l(()=>d.answers[i.value]??``),C=l(()=>{let e=S.value;if(e==null||e===``)return``;let t=y.value.find(t=>String(t.value)===String(e));if(t?.text)return String(t.text);let n=d.questions?.[i.value]?.value_text;return n==null?``:String(n)}),{rowsForTemplate:w,flatRows:T,ningunaRow:E,hiddenRowsCount:D,hiddenRowsTotal:O,showMoreRows:k,showMoreAllRows:M,resetRowsPaging:N}=j(l(()=>A(S.value,C.value,_.value,v.value,y.value)));function P(){x&&clearTimeout(x),x=setTimeout(()=>{let e=(d.answers[n.value]??``).trim();I(),e.length>=3&&(_.value=!0,L(e))},800)}function F(){x&&clearTimeout(x),x=null,b?.abort(),b=null,_.value=!1}function I(){d.setOptions(i.value,[]),v.value=!1,_.value=!1,d.clearAnswer(i.value),N()}async function L(e){b&&b.abort(),b=new AbortController;let t=d?.product??String(p.params.product),n=a.value,r=h(n?d?.answers?.[n]:void 0),o={product:t,locale:m.value};d?.formVersion&&(o.ctx=d.formVersion),r.length&&(o.cnae=JSON.stringify(r)),f&&(o.companiesMock=`1`);try{let t=await c(`/api/search/activity`,{method:`GET`,query:{query:e,...o},signal:b.signal});b=null,d.setOptions(i.value,g(t.data??[])),v.value=!0,_.value=!1}catch(e){if(e.name===`AbortError`||e.code===`ERR_CANCELED`)return;d.setOptions(i.value,[]),v.value=!0,_.value=!1}}async function R(e){if(F(),String(S.value)===String(e.id)){I();let e=(d.answers[n.value]??``).trim();return e.length>=3&&(_.value=!0,L(e)),!1}return await d.setAnswer(i.value,String(e.id),e.text),!0}return s(()=>
1{if(S.value)return;let e=(d.answers[n.value]??``).trim();e.length>=3&&(_.value=!0,L(e))}),o(m,()=>{if(F(),S.value)return;let e=String(d.answers[n.value]??``).trim();d.setOptions(i.value,[]),N(),v.value=!1,_.value=e.length>=3,_.value&&L(e)}),u(F),{rowsForTemplate:w,flatRows:T,ningunaRow:E,hiddenRowsCount:D,hiddenRowsTotal:O,showMoreRows:k,showMoreAllRows:M,activityValue:S,searchDone:v,onRowClick:R,scheduleActivitySearch:P}}export{y as a,h as c,d,g as i,p as l,j as n,v as o,A as r,b as s,M as t,f as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.