Files
igny8/frontend/dist/assets/js/vendor-state-CYwAWrAU.js
Gitea Deploy 961362e088 Add SEO fields to Tasks model, improve content generation response handling, and enhance progress bar animation
- Added primary_keyword, secondary_keywords, tags, and categories fields to Tasks model
- Updated generate_content function to handle full JSON response with all SEO fields
- Improved progress bar animation: smooth 1% increments every 300ms
- Enhanced step detection for content generation vs clustering vs ideas
- Fixed progress modal to show correct messages for each function type
- Added comprehensive logging to Keywords and Tasks pages for AI functions
- Fixed error handling to show meaningful error messages instead of generic failures
2025-11-09 21:22:34 +00:00

2 lines
2.6 KiB
JavaScript

import{R as b}from"./vendor-react-core-DjsjKnCi.js";const H=t=>{let s;const e=new Set,o=(i,h)=>{const v=typeof i=="function"?i(s):i;if(!Object.is(v,s)){const g=s;s=h??(typeof v!="object"||v===null)?v:Object.assign({},s,v),e.forEach(m=>m(s,g))}},a=()=>s,u={setState:o,getState:a,getInitialState:()=>d,subscribe:i=>(e.add(i),()=>e.delete(i))},d=s=t(o,a,u);return u},j=t=>t?H(t):H,k=t=>t;function w(t,s=k){const e=b.useSyncExternalStore(t.subscribe,b.useCallback(()=>s(t.getState()),[t,s]),b.useCallback(()=>s(t.getInitialState()),[t,s]));return b.useDebugValue(e),e}const O=t=>{const s=j(t),e=o=>w(s,o);return Object.assign(e,s),e},F=t=>t?O(t):O;function E(t,s){let e;try{e=t()}catch{return}return{getItem:a=>{var r;const f=d=>d===null?null:JSON.parse(d,void 0),u=(r=e.getItem(a))!=null?r:null;return u instanceof Promise?u.then(f):f(u)},setItem:(a,r)=>e.setItem(a,JSON.stringify(r,void 0)),removeItem:a=>e.removeItem(a)}}const p=t=>s=>{try{const e=t(s);return e instanceof Promise?e:{then(o){return p(o)(e)},catch(o){return this}}}catch(e){return{then(o){return this},catch(o){return p(o)(e)}}}},x=(t,s)=>(e,o,a)=>{let r={storage:E(()=>localStorage),partialize:n=>n,version:0,merge:(n,S)=>({...S,...n}),...s},f=!1;const u=new Set,d=new Set;let i=r.storage;if(!i)return t((...n)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),e(...n)},o,a);const h=()=>{const n=r.partialize({...o()});return i.setItem(r.name,{state:n,version:r.version})},v=a.setState;a.setState=(n,S)=>(v(n,S),h());const g=t((...n)=>(e(...n),h()),o,a);a.getInitialState=()=>g;let m;const _=()=>{var n,S;if(!i)return;f=!1,u.forEach(c=>{var l;return c((l=o())!=null?l:g)});const y=((S=r.onRehydrateStorage)==null?void 0:S.call(r,(n=o())!=null?n:g))||void 0;return p(i.getItem.bind(i))(r.name).then(c=>{if(c)if(typeof c.version=="number"&&c.version!==r.version){if(r.migrate){const l=r.migrate(c.state,c.version);return l instanceof Promise?l.then(I=>[!0,I]):[!0,l]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,c.state];return[!1,void 0]}).then(c=>{var l;const[I,R]=c;if(m=r.merge(R,(l=o())!=null?l:g),e(m,!0),I)return h()}).then(()=>{y==null||y(m,void 0),m=o(),f=!0,d.forEach(c=>c(m))}).catch(c=>{y==null||y(void 0,c)})};return a.persist={setOptions:n=>{r={...r,...n},n.storage&&(i=n.storage)},clearStorage:()=>{i==null||i.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>_(),hasHydrated:()=>f,onHydrate:n=>(u.add(n),()=>{u.delete(n)}),onFinishHydration:n=>(d.add(n),()=>{d.delete(n)})},r.skipHydration||_(),m||g},J=x;export{F as c,J as p};