PageSourceSearch

https://www.tribute.co/static/v3/dist/creator/filepond-plugin-image-preview-zee8jhan.js

js tribute.co collected 2026-09-24 20:01:33 UTC 43,038 bytes, 23 lines download raw bytes

1import{Dj as e0}from"./main-creator-kydzhv9p.js";var QJ=e0((GQ,BQ)=>{/*!
2 * FilePondPluginImagePreview 4.6.12
3 * Licensed under MIT, https://opensource.org/licenses/MIT/
4 * Please visit https://pqina.nl/filepond/ for details.
5 */(function(g,_){typeof GQ==="object"&&typeof BQ<"u"?BQ.exports=_():typeof define==="function"&&define.amd?define(_):(g=g||self,g.FilePondPluginImagePreview=_())})(GQ,function(){var g=function(Q){return/^image/.test(Q.type)};function _(X){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")_=function(Q){return typeof Q};else _=function(Q){return Q&&typeof Symbol==="function"&&Q.constructor===Symbol&&Q!==Symbol.prototype?"symbol":typeof Q};return _(X)}var ZQ;function JJ(X,Q,J,Z){if(!ZQ)ZQ=typeof Symbol==="function"&&Symbol.for&&Symbol.for("react.element")||60103;var Y=X&&X.defaultProps,$=arguments.length-3;if(!Q&&$!==0)Q={children:void 0};if(Q&&Y){for(var K in Y)if(Q[K]===void 0)Q[K]=Y[K]}else if(!Q)Q=Y||{};if($===1)Q.children=Z;else if($>1){var q=Array($);for(var U=0;U<$;U++)q[U]=arguments[U+3];Q.children=q}return{$$typeof:ZQ,type:X,key:J===void 0?null:""+J,ref:null,props:Q,_owner:null}}function XJ(X){var Q;if(typeof Symbol==="function"){if(Symbol.asyncIterator){if(Q=X[Symbol.asyncIterator],Q!=null)return Q.call(X)}if(Symbol.iterator){if(Q=X[Symbol.iterator],Q!=null)return Q.call(X)}}throw TypeError("Object is not async iterable")}function FQ(X){this.wrapped=X}function m(X){var Q,J;function Z(K,q){return new Promise(function(U,G){var M={key:K,arg:q,resolve:U,reject:G,next:null};if(J)J=J.next=M;else Q=J=M,Y(K,q)})}function Y(K,q){try{var U=X[K](q),G=U.value,M=G instanceof FQ;Promise.resolve(M?G.wrapped:G).then(function(F){if(M){Y("next",F);return}$(U.done?"return":"normal",F)},function(F){Y("throw",F)})}catch(F){$("throw",F)}}function $(K,q){switch(K){case"return":Q.resolve({value:q,done:!0});break;case"throw":Q.reject(q);break;default:Q.resolve({value:q,done:!1});break}if(Q=Q.next,Q)Y(Q.key,Q.arg);else J=null}if(this._invoke=Z,typeof X.return!=="function")this.return=void 0}if(typeof Symbol==="function"&&Symbol.asyncIterator)m.prototype[Symbol.asyncIterator]=function(){return this};m.prototype.next=function(X){return this._invoke("next",X)},m.prototype.throw=function(X){return this._invoke("throw",X)},m.prototype.return=function(X){return this._invoke("return",X)};function ZJ(X){return function(){return new m(X.apply(this,arguments))}}function YJ(X){return new FQ(X)}function $J(X,Q){var J={},Z=!1;function Y($,K){return Z=!0,K=new Promise(function(q){q(X[$](K))}),{done:!1,value:Q(K)}}if(typeof Symbol==="function"&&Symbol.iterator)J[Symbol.iterator]=function(){return this};if(J.next=function($){if(Z)return Z=!1,$;return Y("next",$)},typeof X.throw==="function")J.throw=function($){if(Z)throw Z=!1,$;return Y("throw",$)};if(typeof X.return==="function")J.return=function($){return Y("return",$)};return J}function MQ(X,Q,J,Z,Y,$,K){try{var q=X[$](K),U=q.value}catch(G){J(G);return}if(q.done)Q(U);else Promise.resolve(U).then(Z,Y)}function qJ(X){return function(){var Q=this,J=arguments;return new Promise(function(Z,Y){var $=X.apply(Q,J);function K(U){MQ($,Z,Y,K,q,"next",U)}function q(U){MQ($,Z,Y,K,q,"throw",U)}K(void 0)})}}function KJ(X,Q){if(!(X instanceof Q))throw TypeError("Cannot call a class as a function")}function TQ(X,Q){for(var J=0;J<Q.length;J++){var Z=Q[J];if(Z.enumerable=Z.enumerable||!1,Z.configurable=!0,"value"in Z)Z.writable=!0;Object.defineProperty(X,Z.key,Z)}}function UJ(X,Q,J){if(Q)TQ(X.prototype,Q);if(J)TQ(X,J);return X}function NJ(X,Q){for(var J in Q){var Z=Q[J];if(Z.configurable=Z.enumerable=!0,"value"in Z)Z.writable=!0;Object.defineProperty(X,J,Z)}if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(Q);for(var $=0;$<Y.length;$++){var K=Y[$],Z=Q[K];if(Z.configurable=Z.enumerable=!0,"value"in Z)Z.writable=!0;Object.defineProperty(X,K,Z)}}return X}function LJ(X,Q){var J=Object.getOwnPropertyNames(Q);for(var Z=0;Z<J.length;Z++){var Y=J[Z],$=Object.getOwnPropertyDescriptor(Q,Y);if($&&$.configurable&&X[Y]===void 0)Object.defineProperty(X,Y,$)}return X}function DQ(X,Q,J){if(Q in X)Object.defineProperty(X,Q,{value:J,enumerable:!0,configurable:!0,writable:!0});else X[Q]=J;return X}function HQ(){return HQ=Object.assign||function(X){for(var Q=1;Q<arguments.length;Q++){var J=arguments[Q];for(var Z in J)if(Object.prototype.hasOwnProperty.call(J,Z))X[Z]=J[Z]}return X},HQ.apply(this,arguments)}function GJ(X){for(var Q=1;Q<arguments.length;Q++){var J=arguments[Q]!=null?arguments[Q]:{},Z=Object.keys(J);if(typeof Object.getOwnPropertySymbols==="function")Z=Z.concat(Object.getOwnPropertySymbols(J).filter(function(Y){return Object.getOwnPropertyDescriptor(J,Y).enumerable}));Z.forEach(function(Y){DQ(X,Y,J[Y])})}return X}function uQ(X,Q){if(typeof Q!=="function"&&Q!==null)throw TypeError("Super expression must either be null or a function");if(X.prototype=Object.create(Q&&Q.prototype,{constructor:{value:X,writable:!0,configurable:!0}}),Q)c(X,Q)}function BJ(X,Q){X.prototype=Object.create(Q.prototype),X.prototype.constructor=X,X.__proto__=Q}
5function o(X){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(J){return J.__proto__||Object.getPrototypeOf(J)},o(X)}function c(X,Q){return c=Object.setPrototypeOf||function(Z,Y){return Z.__proto__=Y,Z},c(X,Q)}function gQ(){if(typeof Reflect>"u"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy==="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(X){return!1}}function a(X,Q,J){if(gQ())a=Reflect.construct;else a=function(Y,$,K){var q=[null];q.push.apply(q,$);var U=Function.bind.apply(Y,q),G=new U;if(K)c(G,K.prototype);return G};return a.apply(null,arguments)}function mQ(X){return Function.toString.call(X).indexOf("[native code]")!==-1}function YQ(X){var Q=typeof Map==="function"?new Map:void 0;return YQ=function(Z){if(Z===null||!mQ(Z))return Z;if(typeof Z!=="function")throw TypeError("Super expression must either be null or a function");if(typeof Q<"u"){if(Q.has(Z))return Q.get(Z);Q.set(Z,Y)}function Y(){return a(Z,arguments,o(this).constructor)}return Y.prototype=Object.create(Z.prototype,{constructor:{value:Y,enumerable:!1,writable:!0,configurable:!0}}),c(Y,Z)},YQ(X)}function FJ(X,Q){if(Q!=null&&typeof Symbol<"u"&&Q[Symbol.hasInstance])return Q[Symbol.hasInstance](X);else return X instanceof Q}function MJ(X){return X&&X.__esModule?X:{default:X}}function TJ(X){if(X&&X.__esModule)return X;else{var Q={};if(X!=null){for(var J in X)if(Object.prototype.hasOwnProperty.call(X,J)){var Z=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(X,J):{};if(Z.get||Z.set)Object.defineProperty(Q,J,Z);else Q[J]=X[J]}}return Q.default=X,Q}}function DJ(X,Q){if(X!==Q)throw TypeError("Cannot instantiate an arrow function")}function HJ(X){if(X==null)throw TypeError("Cannot destructure undefined")}function cQ(X,Q){if(X==null)return{};var J={},Z=Object.keys(X),Y,$;for($=0;$<Z.length;$++){if(Y=Z[$],Q.indexOf(Y)>=0)continue;J[Y]=X[Y]}return J}function WJ(X,Q){if(X==null)return{};var J=cQ(X,Q),Z,Y;if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(X);for(Y=0;Y<$.length;Y++){if(Z=$[Y],Q.indexOf(Z)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(X,Z))continue;J[Z]=X[Z]}}return J}function lQ(X){if(X===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return X}function OJ(X,Q){if(Q&&(typeof Q==="object"||typeof Q==="function"))return Q;return lQ(X)}function WQ(X,Q){while(!Object.prototype.hasOwnProperty.call(X,Q))if(X=o(X),X===null)break;return X}function $Q(X,Q,J){if(typeof Reflect<"u"&&Reflect.get)$Q=Reflect.get;else $Q=function(Y,$,K){var q=WQ(Y,$);if(!q)return;var U=Object.getOwnPropertyDescriptor(q,$);if(U.get)return U.get.call(K);return U.value};return $Q(X,Q,J||X)}function i(X,Q,J,Z){if(typeof Reflect<"u"&&Reflect.set)i=Reflect.set;else i=function($,K,q,U){var G=WQ($,K),M;if(G){if(M=Object.getOwnPropertyDescriptor(G,K),M.set)return M.set.call(U,q),!0;else if(!M.writable)return!1}if(M=Object.getOwnPropertyDescriptor(U,K),M){if(!M.writable)return!1;M.value=q,Object.defineProperty(U,K,M)}else DQ(U,K,q);return!0};return i(X,Q,J,Z)}function IJ(X,Q,J,Z,Y){var $=i(X,Q,J,Z||X);if(!$&&Y)throw Error("failed to set property");return J}function SJ(X,Q){if(!Q)Q=X.slice(0);return Object.freeze(Object.defineProperties(X,{raw:{value:Object.freeze(Q)}}))}function VJ(X,Q){if(!Q)Q=X.slice(0);return X.raw=Q,X}function RJ(X,Q){if(X===pQ)throw ReferenceError(Q+" is not defined - temporal dead zone");else return X}function EJ(X){throw Error('"'+X+'" is read-only')}function zJ(X){throw Error('Class "'+X+'" cannot be referenced in computed property keys.')}var pQ={};function OQ(X,Q){return qQ(X)||oQ(X,Q)||KQ()}function PJ(X,Q){return qQ(X)||aQ(X,Q)||KQ()}function nQ(X){return qQ(X)||IQ(X)||KQ()}function AJ(X){return sQ(X)||IQ(X)||iQ()}function sQ(X){if(Array.isArray(X)){for(var Q=0,J=Array(X.length);Q<X.length;Q++)J[Q]=X[Q];return J}}function qQ(X){if(Array.isArray(X))return X}function IQ(X){if(Symbol.iterator in Object(X)||Object.prototype.toString.call(X)==="[object Arguments]")return Array.from(X)}function oQ(X,Q){var J=[],Z=!0,Y=!1,$=void 0;try{for(var K=X[Symbol.iterator](),q;!(Z=(q=K.next()).done);Z=!0)if(J.push(q.value),Q&&J.length===Q)break}catch(U){Y=!0,$=U}
5finally{try{if(!Z&&K.return!=null)K.return()}finally{if(Y)throw $}}return J}function aQ(X,Q){var J=[];for(var Z=X[Symbol.iterator](),Y;!(Y=Z.next()).done;)if(J.push(Y.value),Q&&J.length===Q)break;return J}function iQ(){throw TypeError("Invalid attempt to spread non-iterable instance")}function KQ(){throw TypeError("Invalid attempt to destructure non-iterable instance")}function xJ(X){return function(){var Q=X.apply(this,arguments);return Q.next(),Q}}function rQ(X,Q){if(typeof X!=="object"||X===null)return X;var J=X[Symbol.toPrimitive];if(J!==void 0){var Z=J.call(X,Q||"default");if(typeof Z!=="object")return Z;throw TypeError("@@toPrimitive must return a primitive value.")}return(Q==="string"?String:Number)(X)}function SQ(X){var Q=rQ(X,"string");return typeof Q==="symbol"?Q:String(Q)}function CJ(X,Q){throw Error("Decorating class property failed. Please ensure that proposal-class-properties is enabled and set to use loose mode. To use proposal-class-properties in spec mode with decorators, wait for the next major version of decorators in stage 2.")}function jJ(X,Q,J,Z){if(!J)return;Object.defineProperty(X,Q,{enumerable:J.enumerable,configurable:J.configurable,writable:J.writable,value:J.initializer?J.initializer.call(Z):void 0})}function kJ(X,Q,J,Z,Y){var $={};if(Object.keys(Z).forEach(function(K){$[K]=Z[K]}),$.enumerable=!!$.enumerable,$.configurable=!!$.configurable,"value"in $||$.initializer)$.writable=!0;if($=J.slice().reverse().reduce(function(K,q){return q(X,Q,K)||K},$),Y&&$.initializer!==void 0)$.value=$.initializer?$.initializer.call(Y):void 0,$.initializer=void 0;if($.initializer===void 0)Object.defineProperty(X,Q,$),$=null;return $}var tQ=0;function yJ(X){return"__private_"+tQ+++"_"+X}function wJ(X,Q){if(!Object.prototype.hasOwnProperty.call(X,Q))throw TypeError("attempted to use private field on non-instance");return X}function bJ(X,Q){if(!Q.has(X))throw TypeError("attempted to get private field on non-instance");var J=Q.get(X);if(J.get)return J.get.call(X);return J.value}function fJ(X,Q,J){if(!Q.has(X))throw TypeError("attempted to set private field on non-instance");var Z=Q.get(X);if(Z.set)Z.set.call(X,J);else{if(!Z.writable)throw TypeError("attempted to set read only private field");Z.value=J}return J}function vJ(X,Q,J){if(X!==Q)throw TypeError("Private static access of wrong provenance");return J.value}function _J(X,Q,J,Z){if(X!==Q)throw TypeError("Private static access of wrong provenance");if(!J.writable)throw TypeError("attempted to set read only private field");return J.value=Z,Z}function hJ(X,Q,J){if(X!==Q)throw TypeError("Private static access of wrong provenance");return J}function dJ(){throw TypeError("attempted to set read only static private field")}function uJ(X,Q,J,Z){var Y=VQ();if(Z)for(var $=0;$<Z.length;$++)Y=Z[$](Y);var K=Q(function(G){Y.initializeInstanceElements(G,q.elements)},J),q=Y.decorateClass(J0(K.d.map(eQ)),X);return Y.initializeClassElements(K.F,q.elements),Y.runClassFinishers(K.F,q.finishers)}function VQ(){VQ=function(){return X};var X={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(Q,J){["method","field"].forEach(function(Z){J.forEach(function(Y){if(Y.kind===Z&&Y.placement==="own")this.defineClassElement(Q,Y)},this)},this)},initializeClassElements:function(Q,J){var Z=Q.prototype;["method","field"].forEach(function(Y){J.forEach(function($){var K=$.placement;if($.kind===Y&&(K==="static"||K==="prototype")){var q=K==="static"?Q:Z;this.defineClassElement(q,$)}},this)},this)},defineClassElement:function(Q,J){var Z=J.descriptor;if(J.kind==="field"){var Y=J.initializer;Z={enumerable:Z.enumerable,writable:Z.writable,configurable:Z.configurable,value:Y===void 0?void 0:Y.call(Q)}}Object.defineProperty(Q,J.key,Z)},decorateClass:function(Q,J){var Z=[],Y=[],$={static:[],prototype:[],own:[]};
5if(Q.forEach(function(q){this.addElementPlacement(q,$)},this),Q.forEach(function(q){if(!l(q))return Z.push(q);var U=this.decorateElement(q,$);Z.push(U.element),Z.push.apply(Z,U.extras),Y.push.apply(Y,U.finishers)},this),!J)return{elements:Z,finishers:Y};var K=this.decorateConstructor(Z,J);return Y.push.apply(Y,K.finishers),K.finishers=Y,K},addElementPlacement:function(Q,J,Z){var Y=J[Q.placement];if(!Z&&Y.indexOf(Q.key)!==-1)throw TypeError("Duplicated element ("+Q.key+")");Y.push(Q.key)},decorateElement:function(Q,J){var Z=[],Y=[];for(var $=Q.decorators,K=$.length-1;K>=0;K--){var q=J[Q.placement];q.splice(q.indexOf(Q.key),1);var U=this.fromElementDescriptor(Q),G=this.toElementFinisherExtras((0,$[K])(U)||U);if(Q=G.element,this.addElementPlacement(Q,J),G.finisher)Y.push(G.finisher);var M=G.extras;if(M){for(var F=0;F<M.length;F++)this.addElementPlacement(M[F],J);Z.push.apply(Z,M)}}return{element:Q,finishers:Y,extras:Z}},decorateConstructor:function(Q,J){var Z=[];for(var Y=J.length-1;Y>=0;Y--){var $=this.fromClassDescriptor(Q),K=this.toClassDescriptor((0,J[Y])($)||$);if(K.finisher!==void 0)Z.push(K.finisher);if(K.elements!==void 0){Q=K.elements;for(var q=0;q<Q.length-1;q++)for(var U=q+1;U<Q.length;U++)if(Q[q].key===Q[U].key&&Q[q].placement===Q[U].placement)throw TypeError("Duplicated element ("+Q[q].key+")")}}return{elements:Q,finishers:Z}},fromElementDescriptor:function(Q){var J={kind:Q.kind,key:Q.key,placement:Q.placement,descriptor:Q.descriptor},Z={value:"Descriptor",configurable:!0};if(Object.defineProperty(J,Symbol.toStringTag,Z),Q.kind==="field")J.initializer=Q.initializer;return J},toElementDescriptors:function(Q){if(Q===void 0)return;return nQ(Q).map(function(J){var Z=this.toElementDescriptor(J);return this.disallowProperty(J,"finisher","An element descriptor"),this.disallowProperty(J,"extras","An element descriptor"),Z},this)},toElementDescriptor:function(Q){var J=String(Q.kind);if(J!=="method"&&J!=="field")throw TypeError(`An element descriptor's .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "`+J+'"');var Z=SQ(Q.key),Y=String(Q.placement);if(Y!=="static"&&Y!=="prototype"&&Y!=="own")throw TypeError(`An element descriptor's .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "`+Y+'"');var $=Q.descriptor;this.disallowProperty(Q,"elements","An element descriptor");var K={kind:J,key:Z,placement:Y,descriptor:Object.assign({},$)};if(J!=="field")this.disallowProperty(Q,"initializer","A method descriptor");else this.disallowProperty($,"get","The property descriptor of a field descriptor"),this.disallowProperty($,"set","The property descriptor of a field descriptor"),this.disallowProperty($,"value","The property descriptor of a field descriptor"),K.initializer=Q.initializer;return K},toElementFinisherExtras:function(Q){var J=this.toElementDescriptor(Q),Z=EQ(Q,"finisher"),Y=this.toElementDescriptors(Q.extras);return{element:J,finisher:Z,extras:Y}},fromClassDescriptor:function(Q){var J={kind:"class",elements:Q.map(this.fromElementDescriptor,this)},Z={value:"Descriptor",configurable:!0};return Object.defineProperty(J,Symbol.toStringTag,Z),J},toClassDescriptor:function(Q){var J=String(Q.kind);if(J!=="class")throw TypeError(`A class descriptor's .kind property must be "class", but a decorator created a class descriptor with .kind "`+J+'"');this.disallowProperty(Q,"key","A class descriptor"),this.disallowProperty(Q,"placement","A class descriptor"),this.disallowProperty(Q,"descriptor","A class descriptor"),this.disallowProperty(Q,"initializer","A class descriptor"),this.disallowProperty(Q,"extras","A class descriptor");var Z=EQ(Q,"finisher"),Y=this.toElementDescriptors(Q.elements);return{elements:Y,finisher:Z}},runClassFinishers:function(Q,J){for(var Z=0;Z<J.length;Z++){var Y=(0,J[Z])(Q);if(Y!==void 0){if(typeof Y!=="function")throw TypeError("Finishers must return a constructor.");Q=Y}}return Q},disallowProperty:function(Q,J,Z){if(Q[J]!==void 0)throw TypeError(Z+" can't have a ."+J+" property.")}};return X}function eQ(X){var Q=SQ(X.key),J;if(X.kind==="method")J={value:X.value,writable:!0,configurable:!0,enumerable:!1};else if(X.kind==="get")J={get:X.value,configurable:!0,enumerable:!1};else if(X.kind==="set")J={set:X.value,configurable:!0,enumerable:!1};else if(X.kind==="field")J={configurable:!0,writable:!0,enumerable:!0};var Z={kind:X.kind==="field"?"field":"method",key:Q,placement:X.static?"static":X.kind==="field"?"own":"prototype",descriptor:J};if(X.decorators)Z.decorators=X.decorators;if(X.kind==="field")Z.initializer=X.value;return Z}function Q0(X,Q){if(X.descriptor.get!==void 0)Q.descriptor.get=X.descriptor.get;else Q.descriptor.set=X.descriptor.set}function J0(X){var Q=[],J=function(K){return K.kind==="method"&&K.key===Y.key&&K.placement===Y.placement};for(var Z=0;Z<X.length;Z++){var Y=X[Z],$;if(Y.kind==="method"&&($=Q.find(J)))if(RQ(Y.descriptor)||RQ($.descriptor)){if(l(Y)||l($))throw ReferenceError("Duplicated methods ("+Y.key+") can't be decorated.");$.descriptor=Y.descriptor}else{if(l(Y)){if(l($))throw ReferenceError("Decorators can't be placed on different accessors with for the same property ("+Y.key+").");$.decorators=Y.decorators}Q0(Y,$)}else Q.push(Y)}return Q}function l(X){return X.decorators&&X.decorators.length}function RQ(X){return X!==void 0&&!(X.value===void 0&&X.writable===void 0)}function EQ(X,Q){var J=X[Q];if(J!==void 0&&typeof J!=="function")throw TypeError("Expected '"+Q+"' to be a function");return J}function gJ(X,Q,J){if(!Q.has(X))throw TypeError("attempted to get private field on non-instance");return J}function mJ(){throw TypeError("attempted to reassign private method")}function zQ(X,Q){zQ=function(q,U){return new $(q,U)};var J=YQ(RegExp),Z=RegExp.prototype,Y=new WeakMap;function $(q,U){var G=J.call(this,q);return Y.set(G,U),G}uQ($,J),$.prototype.exec=function(q){var U=Z.exec.call(this,q);if(U)U.groups=K(U,this);return U}
5,$.prototype[Symbol.replace]=function(q,U){if(typeof U==="string"){var G=Y.get(this);return Z[Symbol.replace].call(this,q,U.replace(/\$<([^>]+)>/g,function(F,H){return"$"+G[H]}))}else if(typeof U==="function"){var M=this;return Z[Symbol.replace].call(this,q,function(){var F=[];if(F.push.apply(F,arguments),typeof F[F.length-1]!=="object")F.push(K(F,M));return U.apply(this,F)})}else return Z[Symbol.replace].call(this,q,U)};function K(q,U){var G=Y.get(U);return Object.keys(G).reduce(function(M,F){return M[F]=q[G[F]],M},Object.create(null))}return zQ.apply(this,arguments)}var PQ=function(Q,J){return p(Q.x*J,Q.y*J)},AQ=function(Q,J){return p(Q.x+J.x,Q.y+J.y)},X0=function(Q){var J=Math.sqrt(Q.x*Q.x+Q.y*Q.y);if(J===0)return{x:0,y:0};return p(Q.x/J,Q.y/J)},r=function(Q,J,Z){var Y=Math.cos(J),$=Math.sin(J),K=p(Q.x-Z.x,Q.y-Z.y);return p(Z.x+Y*K.x-$*K.y,Z.y+$*K.x+Y*K.y)},p=function(){var Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return{x:Q,y:J}},k=function(Q,J){var Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Y=arguments.length>3?arguments[3]:void 0;if(typeof Q==="string")return parseFloat(Q)*Z;if(typeof Q==="number")return Q*(Y?J[Y]:Math.min(J.width,J.height));return},Z0=function(Q,J,Z){var Y=Q.borderStyle||Q.lineStyle||"solid",$=Q.backgroundColor||Q.fontColor||"transparent",K=Q.borderColor||Q.lineColor||"transparent",q=k(Q.borderWidth||Q.lineWidth,J,Z),U=Q.lineCap||"round",G=Q.lineJoin||"round",M=typeof Y==="string"?"":Y.map(function(H){return k(H,J,Z)}).join(","),F=Q.opacity||1;return{"stroke-linecap":U,"stroke-linejoin":G,"stroke-width":q||0,"stroke-dasharray":M,stroke:K,fill:$,opacity:F}},y=function(Q){return Q!=null},Y0=function(Q,J){var Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Y=k(Q.x,J,Z,"width")||k(Q.left,J,Z,"width"),$=k(Q.y,J,Z,"height")||k(Q.top,J,Z,"height"),K=k(Q.width,J,Z,"width"),q=k(Q.height,J,Z,"height"),U=k(Q.right,J,Z,"width"),G=k(Q.bottom,J,Z,"height");if(!y($))if(y(q)&&y(G))$=J.height-q-G;else $=G;if(!y(Y))if(y(K)&&y(U))Y=J.width-K-U;else Y=U;if(!y(K))if(y(Y)&&y(U))K=J.width-Y-U;else K=0;if(!y(q))if(y($)&&y(G))q=J.height-$-G;else q=0;return{x:Y||0,y:$||0,width:K||0,height:q||0}},$0=function(Q){return Q.map(function(J,Z){return"".concat(Z===0?"M":"L"," ").concat(J.x," ").concat(J.y)}).join(" ")},w=function(Q,J){return Object.keys(J).forEach(function(Z){return Q.setAttribute(Z,J[Z])})},q0="http://www.w3.org/2000/svg",d=function(Q,J){var Z=document.createElementNS(q0,Q);if(J)w(Z,J);return Z},K0=function(Q){return w(Q,Object.assign({},Q.rect,Q.styles))},U0=function(Q){var J=Q.rect.x+Q.rect.width*0.5,Z=Q.rect.y+Q.rect.height*0.5,Y=Q.rect.width*0.5,$=Q.rect.height*0.5;return w(Q,Object.assign({cx:J,cy:Z,rx:Y,ry:$},Q.styles))},N0={contain:"xMidYMid meet",cover:"xMidYMid slice"},L0=function(Q,J){w(Q,Object.assign({},Q.rect,Q.styles,{preserveAspectRatio:N0[J.fit]||"none"}))},G0={left:"start",center:"middle",right:"end"},B0=function(Q,J,Z,Y){var $=k(J.fontSize,Z,Y),K=J.fontFamily||"sans-serif",q=J.fontWeight||"normal",U=G0[J.textAlign]||"start";if(w(Q,Object.assign({},Q.rect,Q.styles,{"stroke-width":0,"font-weight":q,"font-size":$,"font-family":K,"text-anchor":U})),Q.text!==J.text)Q.text=J.text,Q.textContent=J.text.length?J.text:" "},F0=function(Q,J,Z,Y){w(Q,Object.assign({},Q.rect,Q.styles,{fill:"none"}));var $=Q.childNodes[0],K=Q.childNodes[1],q=Q.childNodes[2],U=Q.rect,G={x:Q.rect.x+Q.rect.width,y:Q.rect.y+Q.rect.height};if(w($,{x1:U.x,y1:U.y,x2:G.x,y2:G.y}),!J.lineDecoration)return;K.style.display="none",q.style.display="none";var M=X0({x:G.x-U.x,y:G.y-U.y}),F=k(0.05,Z,Y);if(J.lineDecoration.indexOf("arrow-begin")!==-1){var H=PQ(M,F),P=AQ(U,H),S=r(U,2,P),R=r(U,-2,P);w(K,{style:"display:block;",d:"M".concat(S.x,",").concat(S.y," L").concat(U.x,",").concat(U.y," L").concat(R.x,",").concat(R.y)})}if(J.lineDecoration.indexOf("arrow-end")!==-1){var A=PQ(M,-F),z=AQ(G,A),D=r(G,2,z),T=r(G,-2,z);w(q,{style:"display:block;",d:"M".concat(D.x,",").concat(D.y," L").concat(G.x,",").concat(G.y," L").concat(T.x,",").concat(T.y)})}},M0=function(Q,J,Z,Y){w(Q,Object.assign({},Q.styles,{fill:"none",d:$0(J.points.map(function($){return{x:k($.x,Z,Y,"width"),y:k($.y,Z,Y,"height")}}))}))},t=function(Q){return function(J){return d(Q,{id:J.id})}},T0=function(Q){var J=d("image",{id:Q.id,"stroke-linecap":"round","stroke-linejoin":"round",opacity:"0"});
5return J.onload=function(){J.setAttribute("opacity",Q.opacity||1)},J.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",Q.src),J},D0=function(Q){var J=d("g",{id:Q.id,"stroke-linecap":"round","stroke-linejoin":"round"}),Z=d("line");J.appendChild(Z);var Y=d("path");J.appendChild(Y);var $=d("path");return J.appendChild($),J},H0={image:T0,rect:t("rect"),ellipse:t("ellipse"),text:t("text"),path:t("path"),line:D0},W0={rect:K0,ellipse:U0,image:L0,text:B0,path:M0,line:F0},O0=function(Q,J){return H0[Q](J)},I0=function(Q,J,Z,Y,$){if(J!=="path")Q.rect=Y0(Z,Y,$);Q.styles=Z0(Z,Y,$),W0[J](Q,Z,Y,$)},S0=["x","y","left","top","right","bottom","width","height"],V0=function(Q){return typeof Q==="string"&&/%/.test(Q)?parseFloat(Q)/100:Q},R0=function(Q){var J=OQ(Q,2),Z=J[0],Y=J[1],$=Y.points?{}:S0.reduce(function(K,q){return K[q]=V0(Y[q]),K},{});return[Z,Object.assign({zIndex:0},Y,$)]},E0=function(Q,J){if(Q[1].zIndex>J[1].zIndex)return 1;if(Q[1].zIndex<J[1].zIndex)return-1;return 0},z0=function(Q){return Q.utils.createView({name:"image-preview-markup",tag:"svg",ignoreRect:!0,mixins:{apis:["width","height","crop","markup","resize","dirty"]},write:function(Z){var{root:Y,props:$}=Z;if(!$.dirty)return;var{crop:K,resize:q,markup:U,width:G,height:M}=$,F=K.width,H=K.height;if(q){var P=q.size,S=P&&P.width,R=P&&P.height,A=q.mode,z=q.upscale;if(S&&!R)R=S;if(R&&!S)S=R;var D=F<S&&H<R;if(!D||D&&z){var T=S/F,B=R/H;if(A==="force")F=S,H=R;else{var N;if(A==="cover")N=Math.max(T,B);else if(A==="contain")N=Math.min(T,B);F=F*N,H=H*N}}}var L={width:G,height:M};Y.element.setAttribute("width",L.width),Y.element.setAttribute("height",L.height);var W=Math.min(G/F,M/H);Y.element.innerHTML="";var O=Y.query("GET_IMAGE_PREVIEW_MARKUP_FILTER");U.filter(O).map(R0).sort(E0).forEach(function(E){var I=OQ(E,2),V=I[0],x=I[1],C=O0(V,x);I0(C,V,x,L,W),Y.element.appendChild(C)})}})},n=function(Q,J){return{x:Q,y:J}},P0=function(Q,J){return Q.x*J.x+Q.y*J.y},xQ=function(Q,J){return n(Q.x-J.x,Q.y-J.y)},A0=function(Q,J){return P0(xQ(Q,J),xQ(Q,J))},CQ=function(Q,J){return Math.sqrt(A0(Q,J))},jQ=function(Q,J){var Z=Q,Y=1.5707963267948966,$=J,K=1.5707963267948966-J,q=Math.sin(Y),U=Math.sin($),G=Math.sin(K),M=Math.cos(K),F=Z/q,H=F*U,P=F*G;return n(M*H,M*P)},x0=function(Q,J){var{width:Z,height:Y}=Q,$=jQ(Z,J),K=jQ(Y,J),q=n(Q.x+Math.abs($.x),Q.y-Math.abs($.y)),U=n(Q.x+Q.width+Math.abs(K.y),Q.y+Math.abs(K.x)),G=n(Q.x-Math.abs(K.y),Q.y+Q.height-Math.abs(K.x));return{width:CQ(q,U),height:CQ(q,G)}},C0=function(Q,J){var Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Y=Q.height/Q.width,$=1,K=J,q=1,U=Y;if(U>K)U=K,q=U/Y;var G=Math.max($/q,K/U),M=Q.width/(Z*G*q),F=M*J;return{width:M,height:F}},kQ=function(Q,J,Z,Y){var $=Y.x>0.5?1-Y.x:Y.x,K=Y.y>0.5?1-Y.y:Y.y,q=$*2*Q.width,U=K*2*Q.height,G=x0(J,Z);return Math.max(G.width/q,G.height/U)},yQ=function(Q,J){var Z=Q.width,Y=Z*J;if(Y>Q.height)Y=Q.height,Z=Y/J;var $=(Q.width-Z)*0.5,K=(Q.height-Y)*0.5;return{x:$,y:K,width:Z,height:Y}},j0=function(Q){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=J.zoom,Y=J.rotation,$=J.center,K=J.aspectRatio;if(!K)K=Q.height/Q.width;var q=C0(Q,K,Z),U={x:q.width*0.5,y:q.height*0.5},G={x:0,y:0,width:q.width,height:q.height,center:U},M=typeof J.scaleToFit>"u"||J.scaleToFit,F=kQ(Q,yQ(G,K),Y,M?$:{x:0.5,y:0.5}),H=Z*F;return{widthFloat:q.width/H,heightFloat:q.height/H,width:Math.round(q.width/H),height:Math.round(q.height/H)}},b={type:"spring",stiffness:0.5,damping:0.45,mass:10},k0=function(Q){return Q.utils.createView({name:"image-bitmap",ignoreRect:!0,mixins:{styles:["scaleX","scaleY"]},create:function(Z){var{root:Y,props:$}=Z;Y.appendChild($.image)}})},y0=function(Q){return Q.utils.createView({name:"image-canvas-wrapper",tag:"div",ignoreRect:!0,mixins:{apis:["crop","width","height"],styles:["originX","originY","translateX","translateY","scaleX","scaleY","rotateZ"],animations:{originX:b,originY:b,scaleX:b,scaleY:b,translateX:b,translateY:b,rotateZ:b}},create:function(Z){var{root:Y,props:$}=Z;$.width=$.image.width,$.height=$.image.height,Y.ref.bitmap=Y.appendChildView(Y.createChildView(k0(Q),{image:$.image}))},write:function(Z){var{root:Y,props:$}=Z,K=$.crop.flip,q=Y.ref.bitmap;q.scaleX=K.horizontal?-1:1,q.scaleY=K.vertical?-1:1}})},w0=function(Q){return Q.utils.createView({name:"image-clip",tag:"div",ignoreRect:!0,mixins:{apis:["crop","markup","resize","width","height","dirty","background"],styles:["width","height","o
5pacity"],animations:{opacity:{type:"tween",duration:250}}},didWriteView:function(Z){var{root:Y,props:$}=Z;if(!$.background)return;Y.element.style.backgroundColor=$.background},create:function(Z){var{root:Y,props:$}=Z;Y.ref.image=Y.appendChildView(Y.createChildView(y0(Q),Object.assign({},$))),Y.ref.createMarkup=function(){if(Y.ref.markup)return;Y.ref.markup=Y.appendChildView(Y.createChildView(z0(Q),Object.assign({},$)))},Y.ref.destroyMarkup=function(){if(!Y.ref.markup)return;Y.removeChildView(Y.ref.markup),Y.ref.markup=null};var K=Y.query("GET_IMAGE_PREVIEW_TRANSPARENCY_INDICATOR");if(K===null)return;if(K==="grid")Y.element.dataset.transparencyIndicator=K;else Y.element.dataset.transparencyIndicator="color"},write:function(Z){var{root:Y,props:$,shouldOptimize:K}=Z,q=$.crop,U=$.markup,G=$.resize,M=$.dirty,F=$.width,H=$.height;Y.ref.image.crop=q;var P={x:0,y:0,width:F,height:H,center:{x:F*0.5,y:H*0.5}},S={width:Y.ref.image.width,height:Y.ref.image.height},R={x:q.center.x*S.width,y:q.center.y*S.height},A={x:P.center.x-S.width*q.center.x,y:P.center.y-S.height*q.center.y},z=Math.PI*2+q.rotation%(Math.PI*2),D=q.aspectRatio||S.height/S.width,T=typeof q.scaleToFit>"u"||q.scaleToFit,B=kQ(S,yQ(P,D),z,T?q.center:{x:0.5,y:0.5}),N=q.zoom*B;if(U&&U.length)Y.ref.createMarkup(),Y.ref.markup.width=F,Y.ref.markup.height=H,Y.ref.markup.resize=G,Y.ref.markup.dirty=M,Y.ref.markup.markup=U,Y.ref.markup.crop=j0(S,q);else if(Y.ref.markup)Y.ref.destroyMarkup();var L=Y.ref.image;if(K){L.originX=null,L.originY=null,L.translateX=null,L.translateY=null,L.rotateZ=null,L.scaleX=null,L.scaleY=null;return}L.originX=R.x,L.originY=R.y,L.translateX=A.x,L.translateY=A.y,L.rotateZ=z,L.scaleX=N,L.scaleY=N}})},b0=function(Q){return Q.utils.createView({name:"image-preview",tag:"div",ignoreRect:!0,mixins:{apis:["image","crop","markup","resize","dirty","background"],styles:["translateY","scaleX","scaleY","opacity"],animations:{scaleX:b,scaleY:b,translateY:b,opacity:{type:"tween",duration:400}}},create:function(Z){var{root:Y,props:$}=Z;Y.ref.clip=Y.appendChildView(Y.createChildView(w0(Q),{id:$.id,image:$.image,crop:$.crop,markup:$.markup,resize:$.resize,dirty:$.dirty,background:$.background}))},write:function(Z){var{root:Y,props:$,shouldOptimize:K}=Z,q=Y.ref.clip,U=$.image,G=$.crop,M=$.markup,F=$.resize,H=$.dirty;if(q.crop=G,q.markup=M,q.resize=F,q.dirty=H,q.opacity=K?0:1,K||Y.rect.element.hidden)return;var P=U.height/U.width,S=G.aspectRatio||P,R=Y.rect.inner.width,A=Y.rect.inner.height,z=Y.query("GET_IMAGE_PREVIEW_HEIGHT"),D=Y.query("GET_IMAGE_PREVIEW_MIN_HEIGHT"),T=Y.query("GET_IMAGE_PREVIEW_MAX_HEIGHT"),B=Y.query("GET_PANEL_ASPECT_RATIO"),N=Y.query("GET_ALLOW_MULTIPLE");if(B&&!N)z=R*B,S=B;var L=z!==null?z:Math.max(D,Math.min(R*S,T)),W=L/S;if(W>R)W=R,L=W*S;if(L>A)L=A,W=A/S;q.width=W,q.height=L}})},f0=`<svg width="500" height="200" viewBox="0 0 500 200" preserveAspectRatio="none">
6    <defs>
7        <radialGradient id="gradient-__UID__" cx=".5" cy="1.25" r="1.15">
8            <stop offset='50%' stop-color='#000000'/>
9            <stop offset='56%' stop-color='#0a0a0a'/>
10            <stop offset='63%' stop-color='#262626'/>
11            <stop offset='69%' stop-color='#4f4f4f'/>
12            <stop offset='75%' stop-color='#808080'/>
13            <stop offset='81%' stop-color='#b1b1b1'/>
14            <stop offset='88%' stop-color='#dadada'/>
15            <stop offset='94%' stop-color='#f6f6f6'/>
16            <stop offset='100%' stop-color='#ffffff'/>
17        </radialGradient>
18        <mask id="mask-__UID__">
19            <rect x="0" y="0" width="500" height="200" fill="url(#gradient-__UID__)"></rect>
20        </mask>
21    </defs>
22    <rect x="0" width="500" height="200" fill="currentColor" mask="url(#mask-__UID__)"></rect>
23</svg>`,wQ=0,v0=function(Q){return Q.utils.createView({name:"image-preview-overlay",tag:"div",ignoreRect:!0,create:function(Z){var{root:Y,props:$}=Z,K=f0;if(document.querySelector("base")){var q=new URL(window.location.href.replace(window.location.hash,"")).href;K=K.replace(/url\(\#/g,"url("+q+"#")}wQ++,Y.element.classList.add("filepond--image-preview-overlay-".concat($.status)),Y.element.innerHTML=K.replace(/__UID__/g,wQ)},mixins:{styles:["opacity"],animations:{opacity:{type:"spring",mass:25}}}})},_0=function(){self.onmessage=function(Q){createImageBitmap(Q.data.message.file).then(function(J){self.postMessage({id:Q.data.id,message:J},[J])})}},h0=function(){self.onmessage=function(Q){var J=Q.data.message.imageData,Z=Q.data.message.colorMatrix,Y=J.data,$=Y.length,K=Z[0],q=Z[1],U=Z[2],G=Z[3],M=Z[4],F=Z[5],H=Z[6],P=Z[7],S=Z[8],R=Z[9],A=Z[10],z=Z[11],D=Z[12],T=Z[13],B=Z[14],N=Z[15],L=Z[16],W=Z[17],O=Z[18],E=Z[19],I=0,V=0,x=0,C=0,j=0;for(;I<$;I+=4)V=Y[I]/255,x=Y[I+1]/255,C=Y[I+2]/255,j=Y[I+3]/255,Y[I]=Math.max(0,Math.min((V*K+x*q+C*U+j*G+M)*255,255)),Y[I+1]=Math.max(0,Math.min((V*F+x*H+C*P+j*S+R)*255,255)),Y[I+2]=Math.max(0,Math.min((V*A+x*z+C*D+j*T+
23B)*255,255)),Y[I+3]=Math.max(0,Math.min((V*N+x*L+C*W+j*O+E)*255,255));self.postMessage({id:Q.data.id,message:J},[J.data.buffer])}},d0=function(Q,J){var Z=new Image;Z.onload=function(){var{naturalWidth:Y,naturalHeight:$}=Z;Z=null,J(Y,$)},Z.src=Q},u0={1:function(){return[1,0,0,1,0,0]},2:function(Q){return[-1,0,0,1,Q,0]},3:function(Q,J){return[-1,0,0,-1,Q,J]},4:function(Q,J){return[1,0,0,-1,0,J]},5:function(){return[0,1,1,0,0,0]},6:function(Q,J){return[0,1,-1,0,J,0]},7:function(Q,J){return[0,-1,-1,0,J,Q]},8:function(Q){return[0,-1,1,0,0,Q]}},g0=function(Q,J,Z,Y){if(Y===-1)return;Q.transform.apply(Q,u0[Y](J,Z))},m0=function(Q,J,Z,Y){J=Math.round(J),Z=Math.round(Z);var $=document.createElement("canvas");$.width=J,$.height=Z;var K=$.getContext("2d");if(Y>=5&&Y<=8){var q=[Z,J];J=q[0],Z=q[1]}return g0(K,J,Z,Y),K.drawImage(Q,0,0,J,Z),$},bQ=function(Q){return/^image/.test(Q.type)&&!/svg/.test(Q.type)},c0=10,l0=10,p0=function(Q){var J=Math.min(c0/Q.width,l0/Q.height),Z=document.createElement("canvas"),Y=Z.getContext("2d"),$=Z.width=Math.ceil(Q.width*J),K=Z.height=Math.ceil(Q.height*J);Y.drawImage(Q,0,0,$,K);var q=null;try{q=Y.getImageData(0,0,$,K).data}catch(P){return null}var U=q.length,G=0,M=0,F=0,H=0;for(;H<U;H+=4)G+=q[H]*q[H],M+=q[H+1]*q[H+1],F+=q[H+2]*q[H+2];return G=UQ(G,U),M=UQ(M,U),F=UQ(F,U),{r:G,g:M,b:F}},UQ=function(Q,J){return Math.floor(Math.sqrt(Q/(J/4)))},n0=function(Q,J){J=J||document.createElement("canvas"),J.width=Q.width,J.height=Q.height;var Z=J.getContext("2d");return Z.drawImage(Q,0,0),J},s0=function(Q){var J;try{J=new ImageData(Q.width,Q.height)}catch($){var Z=document.createElement("canvas"),Y=Z.getContext("2d");J=Y.createImageData(Q.width,Q.height)}return J.data.set(new Uint8ClampedArray(Q.data)),J},o0=function(Q){return new Promise(function(J,Z){var Y=new Image;Y.crossOrigin="Anonymous",Y.onload=function(){J(Y)},Y.onerror=function($){Z($)},Y.src=Q})},a0=function(Q){var J=v0(Q),Z=b0(Q),Y=Q.utils.createWorker,$=function(B,N,L){return new Promise(function(W){if(!B.ref.imageData)B.ref.imageData=L.getContext("2d").getImageData(0,0,L.width,L.height);var O=s0(B.ref.imageData);if(!N||N.length!==20)return L.getContext("2d").putImageData(O,0,0),W();var E=Y(h0);E.post({imageData:O,colorMatrix:N},function(I){L.getContext("2d").putImageData(I,0,0),E.terminate(),W()},[O.data.buffer])})},K=function(B,N){B.removeChildView(N),N.image.width=1,N.image.height=1,N._destroy()},q=function(B){var N=B.root,L=N.ref.images.shift();return L.opacity=0,L.translateY=-15,N.ref.imageViewBin.push(L),L},U=function(B){var{root:N,props:L,image:W}=B,O=L.id,E=N.query("GET_ITEM",{id:O});if(!E)return;var I=E.getMetadata("crop")||{center:{x:0.5,y:0.5},flip:{horizontal:!1,vertical:!1},zoom:1,rotation:0,aspectRatio:null},V=N.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR"),x,C,j=!1;if(N.query("GET_IMAGE_PREVIEW_MARKUP_SHOW"))x=E.getMetadata("markup")||[],C=E.getMetadata("resize"),j=!0;var f=N.appendChildView(N.createChildView(Z,{id:O,image:W,crop:I,resize:C,markup:x,dirty:j,background:V,opacity:0,scaleX:1.15,scaleY:1.15,translateY:15}),N.childViews.length);N.ref.images.push(f),f.opacity=1,f.scaleX=1,f.scaleY=1,f.translateY=0,setTimeout(function(){N.dispatch("DID_IMAGE_PREVIEW_SHOW",{id:O})},250)},G=function(B){var{root:N,props:L}=B,W=N.query("GET_ITEM",{id:L.id});if(!W)return;var O=N.ref.images[N.ref.images.length-1];if(O.crop=W.getMetadata("crop"),O.background=N.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR"),N.query("GET_IMAGE_PREVIEW_MARKUP_SHOW"))O.dirty=!0,O.resize=W.getMetadata("resize"),O.markup=W.getMetadata("markup")},M=function(B){var{root:N,props:L,action:W}=B;if(!/crop|filter|markup|resize/.test(W.change.key))return;if(!N.ref.images.length)return;var O=N.query("GET_ITEM",{id:L.id});if(!O)return;if(/filter/.test(W.change.key)){var E=N.ref.images[N.ref.images.length-1];$(N,W.change.value,E.image);return}if(/crop|markup|resize/.test(W.change.key)){var I=O.getMetadata("crop"),V=N.ref.images[N.ref.images.length-1];if(I&&I.aspectRatio&&V.crop&&V.crop.aspectRatio&&Math.abs(I.aspectRatio-V.crop.aspectRatio)>0.00001){var x=q({root:N});U({root:N,props:L,image:n0(x.image)})}else G({root:N,props:L})}},F=function(B){var N=window.navigator.userAgent,L=N.match(/Firefox\/([0-9]+)\./),W=L?parseInt(L[1]):null;if(W!==null&&W<=58)return!1;return"createImageBitmap"in window&&bQ(B)},H=function(B){var{root:N,props:L}=B,W=L.id,O=N.query("GET_ITEM",W);if(!O)return;var E=URL.createObjectURL(O.file);d0(E,function(I,V){N.dispatch("DID_IMAGE_PREVIEW_CALCULATE_SIZE",{id:W,width:I,height:V})})},P=function(B){var{root:N,props:L}=B,W=L.id,O=N.query("GET_ITEM",W);if(!O)return;var E=URL.createObjectURL(O.file),I=function(){o0(E).then(V)},V=function(j){URL.revokeObjectURL(E);var f=O.getMetadata("exif")||{},u=f.orientation||-1,v=j.width,h=j.height;if(!v||!h)return;if(u>=5&&u<=8){var e=[h,v];v=e[0],h=e[1]}var NQ=Math.max(1,window.devicePixelRatio*0.75),LQ=N.query("GET_IMAGE_PREVIEW_ZOOM_FACTOR"),QQ=LQ*NQ,JQ=h/v,vQ=N.rect.element.width,r0=N.rect.element.height,s=vQ,XQ=s*JQ;if(JQ>1)s=Math.min(v,vQ*QQ),XQ=s*JQ;else XQ=Math.min(h,r0*QQ),s=XQ/JQ;var _Q=m0(j,s,XQ,u),hQ=function(){var t0=N.query("GET_IMAGE_PREVIEW_CALCULATE_AVERAGE_IMAGE_COLOR")?p0(data):null;if(O.setMetadata("color",t0,!0),"close"in j)j.close();
23N.ref.overlayShadow.opacity=1,U({root:N,props:L,image:_Q})},dQ=O.getMetadata("filter");if(dQ)$(N,dQ,_Q).then(hQ);else hQ()};if(F(O.file)){var x=Y(_0);x.post({file:O.file},function(C){if(x.terminate(),!C){I();return}V(C)})}else I()},S=function(B){var N=B.root,L=N.ref.images[N.ref.images.length-1];L.translateY=0,L.scaleX=1,L.scaleY=1,L.opacity=1},R=function(B){var N=B.root;N.ref.overlayShadow.opacity=1,N.ref.overlayError.opacity=0,N.ref.overlaySuccess.opacity=0},A=function(B){var N=B.root;N.ref.overlayShadow.opacity=0.25,N.ref.overlayError.opacity=1},z=function(B){var N=B.root;N.ref.overlayShadow.opacity=0.25,N.ref.overlaySuccess.opacity=1},D=function(B){var N=B.root;N.ref.images=[],N.ref.imageData=null,N.ref.imageViewBin=[],N.ref.overlayShadow=N.appendChildView(N.createChildView(J,{opacity:0,status:"idle"})),N.ref.overlaySuccess=N.appendChildView(N.createChildView(J,{opacity:0,status:"success"})),N.ref.overlayError=N.appendChildView(N.createChildView(J,{opacity:0,status:"failure"}))};return Q.utils.createView({name:"image-preview-wrapper",create:D,styles:["height"],apis:["height"],destroy:function(B){var N=B.root;N.ref.images.forEach(function(L){L.image.width=1,L.image.height=1})},didWriteView:function(B){var N=B.root;N.ref.images.forEach(function(L){L.dirty=!1})},write:Q.utils.createRoute({DID_IMAGE_PREVIEW_DRAW:S,DID_IMAGE_PREVIEW_CONTAINER_CREATE:H,DID_FINISH_CALCULATE_PREVIEWSIZE:P,DID_UPDATE_ITEM_METADATA:M,DID_THROW_ITEM_LOAD_ERROR:A,DID_THROW_ITEM_PROCESSING_ERROR:A,DID_THROW_ITEM_INVALID:A,DID_COMPLETE_ITEM_PROCESSING:z,DID_START_ITEM_PROCESSING:R,DID_REVERT_ITEM_PROCESSING:R},function(T){var B=T.root,N=B.ref.imageViewBin.filter(function(L){return L.opacity===0});B.ref.imageViewBin=B.ref.imageViewBin.filter(function(L){return L.opacity>0}),N.forEach(function(L){return K(B,L)}),N.length=0})})},fQ=function(Q){var{addFilter:J,utils:Z}=Q,Y=Z.Type,$=Z.createRoute,K=Z.isFile,q=a0(Q);return J("CREATE_VIEW",function(U){var{is:G,view:M,query:F}=U;if(!G("file")||!F("GET_ALLOW_IMAGE_PREVIEW"))return;var H=function(D){var{root:T,props:B}=D,N=B.id,L=F("GET_ITEM",N);if(!L||!K(L.file)||L.archived)return;var W=L.file;if(!g(W))return;if(!F("GET_IMAGE_PREVIEW_FILTER_ITEM")(L))return;var O="createImageBitmap"in(window||{}),E=F("GET_IMAGE_PREVIEW_MAX_FILE_SIZE");if(!O&&E&&W.size>E)return;T.ref.imagePreview=M.appendChildView(M.createChildView(q,{id:N}));var I=T.query("GET_IMAGE_PREVIEW_HEIGHT");if(I)T.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:L.id,height:I});var V=!O&&W.size>F("GET_IMAGE_PREVIEW_MAX_INSTANT_PREVIEW_FILE_SIZE");T.dispatch("DID_IMAGE_PREVIEW_CONTAINER_CREATE",{id:N},V)},P=function(D,T){if(!D.ref.imagePreview)return;var B=T.id,N=D.query("GET_ITEM",{id:B});if(!N)return;var L=D.query("GET_PANEL_ASPECT_RATIO"),W=D.query("GET_ITEM_PANEL_ASPECT_RATIO"),O=D.query("GET_IMAGE_PREVIEW_HEIGHT");if(L||W||O)return;var E=D.ref,I=E.imageWidth,V=E.imageHeight;if(!I||!V)return;var x=D.query("GET_IMAGE_PREVIEW_MIN_HEIGHT"),C=D.query("GET_IMAGE_PREVIEW_MAX_HEIGHT"),j=N.getMetadata("exif")||{},f=j.orientation||-1;if(f>=5&&f<=8){var u=[V,I];I=u[0],V=u[1]}if(!bQ(N.file)||D.query("GET_IMAGE_PREVIEW_UPSCALE")){var v=2048/I;I*=v,V*=v}var h=V/I,e=(N.getMetadata("crop")||{}).aspectRatio||h,NQ=Math.max(x,Math.min(V,C)),LQ=D.rect.element.width,QQ=Math.min(LQ*e,NQ);D.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:N.id,height:QQ})},S=function(D){var T=D.root;T.ref.shouldRescale=!0},R=function(D){var{root:T,action:B}=D;if(B.change.key!=="crop")return;T.ref.shouldRescale=!0},A=function(D){var{root:T,action:B}=D;T.ref.imageWidth=B.width,T.ref.imageHeight=B.height,T.ref.shouldRescale=!0,T.ref.shouldDrawPreview=!0,T.dispatch("KICK")};M.registerWriter($({DID_RESIZE_ROOT:S,DID_STOP_RESIZE:S,DID_LOAD_ITEM:H,DID_IMAGE_PREVIEW_CALCULATE_SIZE:A,DID_UPDATE_ITEM_METADATA:R},function(z){var{root:D,props:T}=z;if(!D.ref.imagePreview)return;if(D.rect.element.hidden)return;if(D.ref.shouldRescale)P(D,T),D.ref.shouldRescale=!1;if(D.ref.shouldDrawPreview)requestAnimationFrame(function(){requestAnimationFrame(function(){D.dispatch("DID_FINISH_CALCULATE_PREVIEWSIZE",{id:T.id})})}),D.ref.shouldDrawPreview=!1}))}),{options:{allowImagePreview:[!0,Y.BOOLEAN],imagePreviewFilterItem:[function(){return!0},Y.FUNCTION],imagePreviewHeight:[null,Y.INT],imagePreviewMinHeight:[44,Y.INT],imagePreviewMaxHeight:[256,Y.INT],imagePreviewMaxFileSize:[null,Y.INT],imagePreviewZo
23omFactor:[2,Y.INT],imagePreviewUpscale:[!1,Y.BOOLEAN],imagePreviewMaxInstantPreviewFileSize:[1e6,Y.INT],imagePreviewTransparencyIndicator:[null,Y.STRING],imagePreviewCalculateAverageImageColor:[!1,Y.BOOLEAN],imagePreviewMarkupShow:[!0,Y.BOOLEAN],imagePreviewMarkupFilter:[function(){return!0},Y.FUNCTION]}}},i0=typeof window<"u"&&typeof window.document<"u";if(i0)document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:fQ}));return fQ})});export default QJ();

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.