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ACD,KAAK,aAAL;MACCA,KAAK,GAAGA,KAAK,GAAG,GAAR,GAAcN,cAAtB;MACA;;IACD;MACC;EAdD;;EAiBA,OAAOM,KAAP;AACA,CApBD;;AAsBA,MAAMC,iBAAiB,GAAKD,KAAF,IAAa;EACtCA,KAAK,GAAG,CAAEA,KAAK,GAAG,CAAV,EAAcE,OAAd,CAAuBV,cAAvB,CAAR;EACAQ,KAAK,GAAGA,KAAK,CAACzF,QAAN,GAAiBR,OAAjB,CAA0B,uBAA1B,EAAmD6F,kBAAnD,CAAR;EAEA,OAAOI,KAAP;AACA,CALD;;;;;;;;;;;;AC1BA;AACA,IAAI,KAA4D;AAChE,IAAI,CAC2G;AAC/G,CAAC,8BAA8B;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,4CAA4C;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,4CAA4C;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,IAAI;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA,4BAA4B,wBAAwB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA;AACA;AACA,gCAAgC,mCAAmC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,oBAAoB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,8CAA8C;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C,sCAAsC,yCAAyC;AAC/E,kCAAkC,qCAAqC;AACvE,mCAAmC,sCAAsC;AACzE,qBAAqB,uBAAuB;AAC5C,uBAAuB,yBAAyB;AAChD,yBAAyB,2BAA2B;AACpD,oBAAoB,uBAAuB;AAC3C,uBAAuB,0BAA0B;AACjD,iCAAiC,oCAAoC;AACrE,qBAAqB,uBAAuB;AAC5C,2BAA2B,8BAA8B;AACzD,sBAAsB,yBAAyB;AAC/C,qBAAqB,wBAAwB;AAC7C,uBAAuB,0BAA0B;AACjD,yBAAyB,2BAA2B;AACpD,0BAA0B,6BAA6B;AACvD,sBAAsB,yBAAyB;AAC/C,wBAAwB,2BAA2B;AACnD,+BAA+B,iCAAiC;AAChE,+BAA+B,kCAAkC;AACjE,yBAAyB,2BAA2B;AACpD,0BAA0B,4BAA4B;AACtD,gCAAgC,mCAAmC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,WAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,gBAAgB;AAChG;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,+BAA+B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,mBAAmB,gCAAgC;AACnD;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mDAAmD,aAAa;;AAEhE,CAAC;;;;;;;;;;;AC7sED;AACA;AACA;AACA;;AAEA;AACA,CAAC,KAA4D;AAC7D,CAAC,CACwG;AACzG,CAAC,uBAAuB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAM;AACN;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;;AAEA;;AAEA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,sBAAsB;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,yBAAyB,GAAG,yBAAyB;AACjE;AACA;AACA,WAAW,OAAO,KAAK,SAAS,KAAK,SAAS;AAC9C;AACA,gBAAgB,cAAc;AAC9B;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,sFAAsF;AACtF;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,sCAAsC,GAAG,GAAG,IAAI,IAAI,MAAM;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iCAAiC,oBAAoB;AACrD;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI,GAAG;;AAEP;;AAEA,mBAAmB,wBAAwB;AAC3C;;AAEA;AACA;AACA;AACA,KAAK;AACL;;;AAGA;AACA,yFAAyF;AACzF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ;AACR;AACA,MAAM;AACN;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;;AAEA;;AAEA;AACA;AACA,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB,aAAa,iBAAiB;AAC9B;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kDAAkD,GAAG;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB;;AAEtB;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA,WAAW;AACX;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,QAAQ;;;AAGR;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA,OAAO;AACP;;;AAGA;AACA;;AAEA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,OAAO;AACP,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;;AAEA,uCAAuC,OAAO;AAC9C;AACA,OAAO;;;AAGP;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA,qBAAqB,qBAAqB;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA,yCAAyC;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;;AAE3B,uEAAuE;;;AAGvE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,QAAQ;AACR,OAAO;AACP;AACA;AACA;AACA;AACA,UAAU;AACV,QAAQ;AACR;;AAEA;;AAEA,8CAA8C;;AAE9C;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;;AAE/B;AACA;AACA;AACA,KAAK;AACL;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM;AACN;;;AAGA;AACA;AACA,uBAAuB,4BAA4B;AACnD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA,+DAA+D;AAC/D,sDAAsD;AACtD,gDAAgD;AAChD,qDAAqD;AACrD,4DAA4D;AAC5D,qDAAqD;AACrD,gDAAgD;AAChD,2DAA2D;AAC3D,qDAAqD;AACrD,gDAAgD;AAChD,wDAAwD;AACxD,kDAAkD;AAClD,gDAAgD;AAChD,wDAAwD;AACxD,wDAAwD;AACxD,mDAAmD;AACnD,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yCAAyC,sBAAsB,sBAAsB,wBAAwB;AAC7G;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAwB;;AAExB;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA,MAAM;;;AAGN;AACA,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAkC,eAAe;;AAEjD;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,OAAO;AACP;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA,0BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6BAA6B;;AAE7B;AACA,wDAAwD;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC;AACA;AACA,MAAM,GAAG;;AAET;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;;;AAGP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,4BAA4B;;AAE5B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uEAAuE;;AAEvE;AACA,sDAAsD;;AAEtD;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,QAAQ;AACR;AACA;AACA,wCAAwC;AACxC,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA,QAAQ;AACR,OAAO;;;AAGP;AACA;AACA,OAAO;AACP;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM,GAAG;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;;AAEA;AACA;AACA,MAAM,GAAG;;AAET,8DAA8D;;AAE9D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;;;AAGA;AACA,gCAAgC;AAChC,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP,sBAAsB;AACtB;;AAEA;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,+BAA+B;;AAE/B;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA,4FAA4F;AAC5F,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR,8BAA8B;AAC9B;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,gDAAgD;;AAEhD,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;;;AAGA;AACA;AACA,OAAO;;;AAGP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA,QAAQ;AACR,MAAM;AACN;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B;AAC9B,WAAW;AACX,8BAA8B;AAC9B,WAAW;AACX;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD;AACxD;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;;AAGP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,OAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,+BAA+B;;AAE/B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;;AAGA;AACA,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,kDAAkD;;AAElD;AACA;;AAEA;AACA;AACA;;AAEA;AACA,OAAO;;;AAGP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,uBAAuB,UAAU;AACjC;;AAEA;AACA;AACA;AACA;;AAEA;AACA,OAAO;AACP;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;;;AAGP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,4CAA4C;;AAE5C;AACA;;AAEA;AACA;AACA;AACA,OAAO;;;AAGP;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,OAAO;AACP,gCAAgC;AAChC,OAAO;;;AAGP;AACA,yCAAyC,QAAQ;AACjD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;;AAE/B;AACA;;AAEA;AACA;AACA;AACA,OAAO;;;AAGP;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;;;AAGP,iBAAiB,OAAO;AACxB;AACA;AACA;AACA,wDAAwD;;AAExD;AACA;AACA;;AAEA;AACA;;AAEA,sDAAsD,OAAO;AAC7D;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;;;AAGX;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,WAAW;;;AAGX;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA,OAAO;;;AAGP;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,OAAO;;;AAGP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,SAAS;AACT;AACA;AACA,MAAM;AACN;AACA,qCAAqC;;AAErC;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA,OAAO;;;AAGP;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;;AAEA;AACA,QAAQ;;;AAGR;AACA,gCAAgC;AAChC,OAAO;AACP,oCAAoC;AACpC,OAAO;AACP;AACA,OAAO;;;AAGP;;AAEA;AACA;AACA,OAAO;;;AAGP;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,OAAO;AACP;;AAEA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,wBAAwB;AACxB;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,iEAAiE;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;;AAEA;AACA,qCAAqC;;AAErC;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,OAAO;;;AAGP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;;;AAGP;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA,qBAAqB,gBAAgB;AACrC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,wEAAwE,kBAAkB;AAC1F;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;;;AAGA;AACA;AACA,WAAW;;;AAGX;AACA;AACA,WAAW;AACX;AACA;;AAEA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,uEAAuE;AACvE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,gCAAgC;AAChC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;;;AAGA;AACA;AACA;;AAEA,mCAAmC;AACnC;;AAEA;AACA;AACA;;AAEA;AACA,SAAS;;;AAGT;AACA;AACA,QAAQ,GAAG;;AAEX;AACA,4CAA4C;AAC5C,SAAS;AACT;AACA;AACA;;AAEA;AACA,yEAAyE,kBAAkB;AAC3F;AACA,aAAa;AACb;AACA;AACA,UAAU;AACV;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;;AAEN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,OAAO;AACP;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA,8BAA8B;;AAE9B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,2DAA2D;;AAE3D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,2CAA2C;;AAE3C;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW;;AAEX,SAAS;AACT;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4CAA4C;AAC5C,SAAS;;AAET,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;;;AAGP;;AAEA;AACA;AACA;;AAEA,0BAA0B;;AAE1B;AACA;AACA;AACA;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA,UAAU;AACV;AACA,OAAO;AACP;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA,QAAQ,GAAG;;AAEX;AACA;AACA;AACA;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;AACA;AACA,UAAU,GAAG;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;;AAGA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;AACN,MAAM;;;AAGN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,GAAG;;AAEP;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;AACA;AACA,IAAI,GAAG;;AAEP;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI,GAAG;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,eAAe,WAAW,WAAW,SAAS;AAC3E;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,QAAQ;AACR;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,MAAM;AACN,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qNAAqN;AACrN;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA,IAAI;AACJ;AACA,kCAAkC;;AAElC;;AAEA;AACA;AACA;AACA;AACA,kDAAkD;AAClD,OAAO;AACP;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA,gEAAgE;;AAEhE;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;AACA,MAAM,GAAG;;AAET;AACA;AACA,MAAM,GAAG;;AAET;AACA;AACA;AACA;AACA,MAAM;AACN,gEAAgE;;AAEhE;AACA;AACA;AACA;AACA,QAAQ;AACR,MAAM;AACN,IAAI;AACJ;;AAEA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,cAAc,eAAe,YAAY,WAAW,iBAAiB;AACzH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD,6CAA6C;AAC7C;;AAEA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA,IAAI,gBAAgB;;AAEpB,oBAAoB;;AAEpB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;;AAGA;AACA;AACA,IAAI;AACJ;AACA,IAAI,GAAG;;AAEP;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAM;;;AAGN;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;;AAGA;AACA;AACA,MAAM;AACN;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,IAAI,GAAG;;AAEP;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI,GAAG;;AAEP;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA,IAAI,GAAG;AACP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;;AAER;AACA,qDAAqD;;AAErD;AACA;AACA,OAAO;AACP;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA,IAAI,GAAG;;AAEP;AACA;AACA,+CAA+C;;AAE/C,4CAA4C;AAC5C;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM,yBAAyB;;AAE/B;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA,SAAS;;;AAGT;AACA;AACA;AACA,MAAM;AACN,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;AACD,gCAAgC;AAChC;;;;;;;;;;;;ACj3JA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;ACNA;AACA;AAEA5T,QAAQ,CAACoE,gBAAT,CAA2B,kBAA3B,EAAiDC,KAAF,IAAa;EAC3DpC,2EAAqB;EACrBmE,2EAAqB;AACrB,CAHD,E","sources":["webpack://realpress/./assets/src/js/frontend/archive-property/property-list.js","webpack://realpress/./assets/src/js/frontend/archive-property/switch-layout.js","webpack://realpress/./assets/src/js/frontend/mixins/property-list.js","webpack://realpress/./assets/src/js/frontend/mixins/search.js","webpack://realpress/./assets/src/js/frontend/shortcode/advanced-search/advanced-search.js","webpack://realpress/./assets/src/js/frontend/shortcode/advanced-search/fields/area-size.js","webpack://realpress/./assets/src/js/frontend/shortcode/advanced-search/fields/bath.js","webpack://realpress/./assets/src/js/frontend/shortcode/advanced-search/fields/bed.js","webpack://realpress/./assets/src/js/frontend/shortcode/advanced-search/fields/feature.js","webpack://realpress/./assets/src/js/frontend/shortcode/advanced-search/fields/keyword.js","webpack://realpress/./assets/src/js/frontend/shortcode/advanced-search/fields/location.js","webpack://realpress/./assets/src/js/frontend/shortcode/advanced-search/fields/price.js","webpack://realpress/./assets/src/js/frontend/shortcode/advanced-search/fields/room.js","webpack://realpress/./assets/src/js/frontend/shortcode/advanced-search/fields/status.js","webpack://realpress/./assets/src/js/frontend/shortcode/advanced-search/fields/type.js","webpack://realpress/./assets/src/js/frontend/shortcode/advanced-search/fields/verified.js","webpack://realpress/./assets/src/js/frontend/shortcode/advanced-search/fields/year-built.js","webpack://realpress/./assets/src/js/mixins/price.js","webpack://realpress/./node_modules/nouislider/dist/nouislider.js","webpack://realpress/./node_modules/tom-select/dist/js/tom-select.complete.js","webpack://realpress/external window [\"wp\",\"url\"]","webpack://realpress/webpack/bootstrap","webpack://realpress/webpack/runtime/compat get default export","webpack://realpress/webpack/runtime/define property getters","webpack://realpress/webpack/runtime/hasOwnProperty shorthand","webpack://realpress/webpack/runtime/make namespace object","webpack://realpress/./assets/src/js/frontend/realpress-archive-property.tsx"],"sourcesContent":["import { addQueryArgs } from '@wordpress/url';\nimport { getOrderParams } from '../mixins/property-list';\nimport { getParamsOfUrl, getUrl } from '../mixins/search';\nimport { getQuery } from '../shortcode/advanced-search/advanced-search';\n\nconst archivePropertyNode = document.querySelector( '.realpress-archive-property' );\nconst sortNode = archivePropertyNode.querySelector( '.realpress-sort-by select' );\nconst containerNode = archivePropertyNode.querySelector( '.realpress-property-container' );\nconst searchNode = document.querySelector( '.realpress-advanced-search' );\n//Loadmore\nconst loadMoreWrapperNode = archivePropertyNode.querySelector( '.realpress-load-more' );\nlet loadmoreBtnNode, loadingNode;\n\n//infinite scroll\nconst infiniteScrollNode = archivePropertyNode.querySelector( '.realpress-infinite-scroll' );\nlet infiniteLoadingNode;\n//-----------\nconst restNamespace = REALPRESS_GLOBAL_OBJECT.rest_namespace || '';\n\nlet paginationType;\nlet defaultQuery = { orderby: 'date', order: 'desc' };\nlet query = {};\nlet isFetching = false;\nlet nextPage = null;\nlet reseting = false;\n\nconst init = () => {\n\tconst { taxonomy = '' } = REALPRESS_PROPERTY_ARCHIVE_OBJECT;\n\tconst termId = REALPRESS_PROPERTY_ARCHIVE_OBJECT.term_id || '';\n\tif ( !! termId && taxonomy ) {\n\t\tdefaultQuery = { ...defaultQuery, term_id: termId, taxonomy };\n\t}\n\n\tif ( typeof REALPRESS_GLOBAL_OBJECT.pll_current_lang !== 'undefined' ) {\n\t\tdefaultQuery = { ...defaultQuery, pll_current_lang: REALPRESS_GLOBAL_OBJECT.pll_current_lang };\n\t}\n\n\tif ( typeof REALPRESS_GLOBAL_OBJECT.wpml_current_lang !== 'undefined' ) {\n\t\tdefaultQuery = { ...defaultQuery, wpml_current_lang: REALPRESS_GLOBAL_OBJECT.wpml_current_lang };\n\t}\n\n\tconst queryParams = getParamsOfUrl();\n\n\tif ( Object.keys( queryParams ).length ) {\n\t\tquery = { ...query, ...queryParams };\n\t}\n\n\t//Loadmore\n\tif ( loadMoreWrapperNode ) {\n\t\tloadmoreBtnNode = loadMoreWrapperNode.querySelector( '.realpress-load-more-btn' );\n\t\tloadingNode = loadMoreWrapperNode.querySelector( '.realpress-loading-display' );\n\t\tpaginationType = 'loadmore';\n\t}\n\n\t//Infinite Scroll\n\tif ( infiniteScrollNode ) {\n\t\tinfiniteLoadingNode = infiniteScrollNode.querySelector( '.realpress-loading-display' );\n\t\tpaginationType = 'infinite_scroll';\n\t}\n\n\tif ( ! paginationType ) {\n\t\tpaginationType = 'standard';\n\t}\n\n\tdefaultQuery = { ...defaultQuery, pagination_type: paginationType };\n};\n\nconst realpressListProperty = () => {\n\tinit();\n\tsort();\n\tif ( searchNode ) {\n\t\treset();\n\t\tsearch();\n\t}\n\tgetProperties( query );\n\tpagination();\n};\n\nconst getProperties = ( queryParam = {}, isLoadmore = false ) => {\n\tif ( isLoadmore === false ) {\n\t\tcontainerNode.style.opacity = 0.4;\n\t}\n\n\tlet param = { ...defaultQuery, ...queryParam };\n\n\tif ( containerNode.getAttribute( 'data-loop-item-id' ) ) {\n\t\tparam = { ...param, 'loop-item-id': containerNode.getAttribute( 'data-loop-item-id' ) };\n\t}\n\n\twp.apiFetch( {\n\t\tpath: addQueryArgs( '/' + restNamespace + '/properties', param ),\n\t\tmethod: 'GET',\n\t} ).then( ( res ) => {\n\t\tif ( res.data.content !== undefined ) {\n\t\t\tif ( isLoadmore ) {\n\t\t\t\tcontainerNode.insertAdjacentHTML( 'beforeend', res.data.content );\n\t\t\t} else {\n\t\t\t\tcontainerNode.innerHTML = res.data.content;\n\t\t\t}\n\t\t} else {\n\t\t\tif ( loadMoreWrapperNode ) {\n\t\t\t\tloadMoreWrapperNode.style.display = 'none';\n\t\t\t}\n\t\t\tif ( res.msg && isLoadmore === false ) {\n\t\t\t\tcontainerNode.innerHTML = `

${ res.msg }

`;\n\t\t\t}\n\t\t}\n\t\trenderPagination( res );\n\t} ).catch( ( err ) => {\n\t\tconsole.log( err );\n\t} ).finally( () => {\n\t\tif ( isLoadmore === false ) {\n\t\t\tconst urlPush = getUrl( query );\n\t\t\twindow.history.pushState( '', '', urlPush );\n\t\t}\n\t\tcontainerNode.style.opacity = 1;\n\t} );\n};\n\nconst sort = () => {\n\tif ( ! sortNode ) {\n\t\treturn;\n\t}\n\n\tsortNode.addEventListener( 'change', function( event ) {\n\t\tif ( reseting ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst selected = event.target.value;\n\t\tconst sortParams = getOrderParams( selected );\n\t\tquery = { ...query, ...sortParams };\n\t\t//Loadmore and infinite scroll\n\t\tif ( paginationType !== 'standard' && Object.hasOwn( query, 'page' ) ) {\n\t\t\tdelete query.page;\n\t\t}\n\t\tgetProperties( query );\n\t} );\n};\n\nconst reset = () => {\n\tconst resetButtonNode = searchNode.querySelector( 'button.realpress-reset' );\n\tif ( resetButtonNode ) {\n\t\tresetButtonNode.addEventListener( 'click', function() {\n\t\t\treseting = true;\n\t\t\tsortNode.tomselect.setValue( 'default' );\n\n\t\t\tquery = {};\n\n\t\t\t//For demo\n\t\t\tconst queryParams = getParamsOfUrl();\n\t\t\tif ( Object.hasOwn( queryParams, 'view' ) && ( queryParams.view === 'loadmore' || queryParams.view === 'infinite_scroll' ) ) {\n\t\t\t\tquery.view = queryParams.view;\n\n\t\t\t\tcontainerNode.innerHTML = '';\n\t\t\t\tif ( loadingNode ) {\n\t\t\t\t\tloadingNode.style.display = 'block';\n\t\t\t\t\tloadmoreBtnNode.innerHTML = '';\n\t\t\t\t}\n\n\t\t\t\tif ( infiniteLoadingNode ) {\n\t\t\t\t\tinfiniteLoadingNode.style.display = 'block';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//end\n\t\t\tgetProperties( query );\n\t\t\treseting = false;\n\t\t} );\n\t}\n};\n\nconst search = () => {\n\tdocument.addEventListener( 'click', function( event ) {\n\t\tif ( event.target.classList.contains( 'realpress-search' ) || event.target.classList.contains( 'realpress-view-all' ) ) {\n\t\t\tquery = getQuery( query );\n\n\t\t\tif ( Object.hasOwn( query, 'page' ) ) {\n\t\t\t\tdelete query.page;\n\t\t\t}\n\n\t\t\tgetProperties( query );\n\t\t}\n\t} );\n};\n\nconst renderPagination = ( res ) => {\n\tif ( paginationType === 'standard' ) {\n\t\tif ( res.data.pagination !== undefined ) {\n\t\t\tarchivePropertyNode.querySelector( '.realpress-pagination' ).innerHTML = res.data.pagination;\n\t\t} else {\n\t\t\tarchivePropertyNode.querySelector( '.realpress-pagination' ).innerHTML = '';\n\t\t}\n\n\t\tif ( res.data.from_to !== undefined ) {\n\t\t\tarchivePropertyNode.querySelector( '.realpress-from-to' ).innerHTML = res.data.from_to;\n\t\t} else {\n\t\t\tarchivePropertyNode.querySelector( '.realpress-from-to' ).innerHTML = '';\n\t\t}\n\t}\n\n\tif ( paginationType === 'loadmore' ) {\n\t\tif ( res.data.pagination === undefined ) {\n\t\t\tnextPage = null;\n\t\t\treturn;\n\t\t}\n\n\t\tloadmoreBtnNode.innerHTML = res.data.pagination;\n\t\tloadingNode.style.display = 'none';\n\t\tif ( res.data.next_page ) {\n\t\t\tnextPage = res.data.next_page;\n\t\t} else {\n\t\t\tnextPage = null;\n\t\t}\n\t}\n\n\tif ( paginationType === 'infinite_scroll' ) {\n\t\tinfiniteLoadingNode.style.display = 'none';\n\t\tisFetching = false;\n\t\tif ( res.data.next_page ) {\n\t\t\tnextPage = res.data.next_page;\n\t\t} else {\n\t\t\tnextPage = null;\n\t\t}\n\t}\n};\n\nconst pagination = () => {\n\tdocument.addEventListener( 'click', function( event ) {\n\t\tconst target = event.target;\n\t\tconst item = target.closest( 'a' );\n\t\tif ( paginationType === 'standard' ) {\n\t\t\tif ( ! item ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( ! item.getAttribute( 'data-page' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst paginationNode = target.closest( '.realpress-pagination' );\n\t\t\tif ( ! paginationNode ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\tconst page = item.getAttribute( 'data-page' );\n\t\t\tquery = { ...query, page };\n\t\t\tgetProperties( query );\n\t\t\tarchivePropertyNode.scrollIntoView( { behavior: 'smooth' } );\n\t\t}\n\n\t\tif ( paginationType === 'loadmore' ) {\n\t\t\tif ( target.parentNode !== loadmoreBtnNode ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tevent.preventDefault();\n\t\t\ttarget.remove();\n\t\t\tloadingNode.style.display = 'block';\n\t\t\tquery = { ...query, page: nextPage };\n\t\t\tgetProperties( query, true );\n\t\t}\n\t} );\n\n\tif ( paginationType === 'infinite_scroll' ) {\n\t\twindow.addEventListener( 'scroll', ( event ) => {\n\t\t\tgetScrollData();\n\t\t} );\n\t}\n};\n\nconst getScrollData = () => {\n\tconst distance = infiniteScrollNode.getBoundingClientRect().top - window.innerHeight;\n\n\tif ( isFetching === false && distance < 0 && nextPage ) {\n\t\tisFetching = true;\n\t\tinfiniteLoadingNode.style.display = 'block';\n\t\tquery = { ...query, page: nextPage };\n\t\tgetProperties( query, true );\n\t}\n};\n\nexport default realpressListProperty;\n","let archivePropertyContentNode, switchViewNodes, container;\nconst realpressSwitchLayout = () => {\n\tarchivePropertyContentNode = document.querySelector( '.realpress-archive-property-content' );\n\n\tif ( ! archivePropertyContentNode ) {\n\t\treturn;\n\t}\n\n\tswitchViewNodes = archivePropertyContentNode.querySelectorAll( '.realpress-item-switch-view li' );\n\tif ( ! switchViewNodes.length ) {\n\t\treturn;\n\t}\n\tcontainer = archivePropertyContentNode.querySelector( '.realpress-property-container' );\n\n\tlet col = JSON.parse( localStorage.getItem( 'realpress_archive_property_layout_active' ) );\n\tlet activeNode = archivePropertyContentNode.querySelector( '.realpress-item-switch-view li[data-grid-col=\"' + col + '\"]' );\n\n\tif ( col == null || ! activeNode ) {\n\t\tconst pageLayout = REALPRESS_GLOBAL_OBJECT.property_page_layout || 'list';\n\t\tif ( pageLayout === 'list' ) {\n\t\t\tactiveNode = switchViewNodes[ 0 ];\n\t\t} else {\n\t\t\tactiveNode = switchViewNodes[ switchViewNodes.length - 1 ];\n\t\t}\n\t\tcol = activeNode.getAttribute( 'data-grid-col' );\n\t\tactiveNode.classList.add( 'active' );\n\t\tlocalStorage.setItem( 'realpress_archive_property_layout_active', JSON.stringify( col ) );\n\t}\n\n\tactiveNode.classList.add( 'active' );\n\tcontainer.setAttribute( 'data-grid-col', col );\n\n\tswitchViewMode();\n};\n\nconst switchViewMode = () => {\n\tfor ( let i = 0; i < switchViewNodes.length; i++ ) {\n\t\tswitchViewNodes[ i ].addEventListener( 'click', function() {\n\t\t\tconst activeViewNode = archivePropertyContentNode.querySelector( '.realpress-item-switch-view li.active' );\n\t\t\tconst activeView = activeViewNode.getAttribute( 'class' );\n\t\t\tconst view = this.getAttribute( 'class' );\n\t\t\tif ( view !== activeView ) {\n\t\t\t\tactiveViewNode.classList.remove( 'active' );\n\t\t\t\tthis.classList.add( 'active' );\n\t\t\t\tconst col = this.getAttribute( 'data-grid-col' );\n\t\t\t\tcontainer.setAttribute( 'data-grid-col', col );\n\t\t\t\tlocalStorage.setItem( 'realpress_archive_property_layout_active', JSON.stringify( col ) );\n\t\t\t}\n\t\t} );\n\t}\n};\n\nexport default realpressSwitchLayout;\n","\r\nexport const getOrderParams = ( selected ) => {\r\n\tlet orderby, order;\r\n\tswitch ( selected ) {\r\n\tcase 'default':\r\n\t\torderby = 'date';\r\n\t\torder = 'desc';\r\n\t\tbreak;\r\n\tcase 'name_asc':\r\n\t\torderby = 'title';\r\n\t\torder = 'asc';\r\n\t\tbreak;\r\n\tcase 'name_desc':\r\n\t\torderby = 'title';\r\n\t\torder = 'desc';\r\n\t\tbreak;\r\n\tcase 'price_desc':\r\n\t\torderby = 'price';\r\n\t\torder = 'desc';\r\n\t\tbreak;\r\n\tcase 'price_asc':\r\n\t\torderby = 'price';\r\n\t\torder = 'asc';\r\n\t\tbreak;\r\n\tcase 'rating_desc':\r\n\t\torderby = 'rating';\r\n\t\torder = 'desc';\r\n\t\tbreak;\r\n\tcase 'rating_asc':\r\n\t\torderby = 'rating';\r\n\t\torder = 'asc';\r\n\t\tbreak;\r\n\tdefault:\r\n\t\torderby = 'date';\r\n\t\torder = 'desc';\r\n\t\tbreak;\r\n\t}\r\n\r\n\treturn { orderby, order };\r\n};\r\n\r\n","import { addQueryArgs } from '@wordpress/url';\n\nconst getParamOfUrl = ( param ) => {\n\tconst urlParams = new URLSearchParams( location.search );\n\n\treturn urlParams.get( param );\n};\n\nconst getParamsOfUrl = () => {\n\tconst urlParams = new URLSearchParams( location.search );\n\n\tconst queryParams = {};\n\tfor ( const [ key, value ] of urlParams ) {\n\t\tqueryParams[ key ] = value;\n\t}\n\n\treturn queryParams;\n};\n\nconst getUrl = ( args ) => {\n\treturn addQueryArgs( document.location.origin + document.location.pathname, args );\n};\n\nexport { getParamOfUrl, getParamsOfUrl, getUrl };\n\n","import { addQueryArgs } from '@wordpress/url';\r\nimport realpressKeyword, { getKeywordValue, resetKeyword } from './fields/keyword';\r\nimport realpressPrice, { getMaxPriceValue, getMinPriceValue, resetPrice } from './fields/price';\r\nimport realpressRoom, { getRoomValue, resetRoom } from './fields/room';\r\nimport realpressBath, { getBathValue, resetBath } from './fields/bath';\r\nimport realpressBed, { getBedValue, resetBed } from './fields/bed';\r\nimport realpressAreaSize, { getMaxAreaValue, getMinAreaValue, resetAreaSize } from './fields/area-size';\r\nimport realpressYearBuilt, { getMaxYearValue, getMinYearValue, resetYearBuilt } from './fields/year-built';\r\nimport realpressType, { getTypeValue, resetType } from './fields/type';\r\nimport realpressLocation, { getLocationValue, resetLocation } from './fields/location';\r\nimport { getFeatureValue, resetFeature } from './fields/feature';\r\nimport { getStatusValue, resetStatus } from './fields/status';\r\nimport { getVerifiedValue, resetVerified } from './fields/verified';\r\n\r\nlet searchNode;\r\n\r\nconst realpressAdvancedSearch = () => {\r\n\tsearchNode = document.querySelector( '.realpress-advanced-search' );\r\n\r\n\tif ( ! searchNode ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\thandleFields();\r\n\treset();\r\n\tsearch();\r\n};\r\n\r\nconst search = () => {\r\n\tconst halfMapNode = document.querySelector( '#realpress-search-with-map' );\r\n\tconst headerMapNode = document.querySelector( '#realpress-header-map' );\r\n\tconst archivePropertyNode = document.querySelector( '.realpress-archive-property' );\r\n\r\n\tif ( halfMapNode || archivePropertyNode || headerMapNode ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tconst redirectUrl = REALPRESS_GLOBAL_OBJECT.advanced_search.redirect_page_url || '';\r\n\r\n\tdocument.addEventListener( 'click', function( event ) {\r\n\t\tif ( event.target.classList.contains( 'realpress-search' ) || event.target.classList.contains( 'realpress-view-all' ) ) {\r\n\t\t\tdocument.location.href = addQueryArgs( redirectUrl, getQuery() );\r\n\t\t}\r\n\t} );\r\n};\r\n\r\nconst getQuery = ( newQuery = {} ) => {\r\n\t//Keyword\r\n\tif ( getKeywordValue() ) {\r\n\t\tnewQuery = { ...newQuery, keyword: getKeywordValue() };\r\n\t} else if ( newQuery.hasOwnProperty( 'keyword' ) ) {\r\n\t\tdelete newQuery.keyword;\r\n\t}\r\n\r\n\t//Price\r\n\tif ( getMinPriceValue() ) {\r\n\t\tnewQuery = { ...newQuery, min_price: getMinPriceValue() };\r\n\t} else if ( newQuery.hasOwnProperty( 'min_price' ) ) {\r\n\t\tdelete newQuery.min_price;\r\n\t}\r\n\r\n\tif ( getMaxPriceValue() ) {\r\n\t\tnewQuery = { ...newQuery, max_price: getMaxPriceValue() };\r\n\t} else if ( newQuery.hasOwnProperty( 'max_price' ) ) {\r\n\t\tdelete newQuery.max_price;\r\n\t}\r\n\r\n\t//Rooms\r\n\tif ( getRoomValue() ) {\r\n\t\tnewQuery = { ...newQuery, room: getRoomValue() };\r\n\t} else if ( newQuery.hasOwnProperty( 'room' ) ) {\r\n\t\tdelete newQuery.room;\r\n\t}\r\n\t//Bath\r\n\tif ( getBathValue() ) {\r\n\t\tnewQuery = { ...newQuery, bath: getBathValue() };\r\n\t} else if ( newQuery.hasOwnProperty( 'bath' ) ) {\r\n\t\tdelete newQuery.bath;\r\n\t}\r\n\t//Bed\r\n\tif ( getBedValue() ) {\r\n\t\tnewQuery = { ...newQuery, bed: getBedValue() };\r\n\t} else if ( newQuery.hasOwnProperty( 'bed' ) ) {\r\n\t\tdelete newQuery.bed;\r\n\t}\r\n\t//Area\r\n\tif ( getMinAreaValue() ) {\r\n\t\tnewQuery = { ...newQuery, min_area: getMinAreaValue() };\r\n\t} else if ( newQuery.hasOwnProperty( 'min_area' ) ) {\r\n\t\tdelete newQuery.min_area;\r\n\t}\r\n\tif ( getMaxAreaValue() ) {\r\n\t\tnewQuery = { ...newQuery, max_area: getMaxAreaValue() };\r\n\t} else if ( newQuery.hasOwnProperty( 'max_area' ) ) {\r\n\t\tdelete newQuery.max_area;\r\n\t}\r\n\t//Year Built\r\n\tif ( getMinYearValue() ) {\r\n\t\tnewQuery = { ...newQuery, min_year: getMinYearValue() };\r\n\t} else if ( newQuery.hasOwnProperty( 'min_year' ) ) {\r\n\t\tdelete newQuery.min_year;\r\n\t}\r\n\tif ( getMaxYearValue() ) {\r\n\t\tnewQuery = { ...newQuery, max_year: getMaxYearValue() };\r\n\t} else if ( newQuery.hasOwnProperty( 'max_year' ) ) {\r\n\t\tdelete newQuery.max_year;\r\n\t}\r\n\r\n\tif ( getTypeValue() ) {\r\n\t\tnewQuery = { ...newQuery, type: getTypeValue() };\r\n\t} else if ( newQuery.hasOwnProperty( 'type' ) ) {\r\n\t\tdelete newQuery.type;\r\n\t}\r\n\r\n\tif ( getLocationValue() ) {\r\n\t\tnewQuery = { ...newQuery, location: getLocationValue() };\r\n\t} else if ( newQuery.hasOwnProperty( 'location' ) ) {\r\n\t\tdelete newQuery.location;\r\n\t}\r\n\r\n\tif ( getFeatureValue() ) {\r\n\t\tnewQuery = { ...newQuery, feature: getFeatureValue() };\r\n\t} else if ( newQuery.hasOwnProperty( 'feature' ) ) {\r\n\t\tdelete newQuery.feature;\r\n\t}\r\n\r\n\tif ( getStatusValue() ) {\r\n\t\tnewQuery = { ...newQuery, status: getStatusValue() };\r\n\t} else if ( newQuery.hasOwnProperty( 'status' ) ) {\r\n\t\tdelete newQuery.status;\r\n\t}\r\n\r\n\tif ( getVerifiedValue() ) {\r\n\t\tnewQuery = { ...newQuery, verified: getVerifiedValue() };\r\n\t} else if ( newQuery.hasOwnProperty( 'verified' ) ) {\r\n\t\tdelete newQuery.status;\r\n\t}\r\n\r\n\treturn newQuery;\r\n};\r\n\r\nconst reset = () => {\r\n\tconst resetButtonNode = document.querySelector( '.realpress-reset' );\r\n\tif ( resetButtonNode ) {\r\n\t\tresetButtonNode.addEventListener( 'click', function( event ) {\r\n\t\t\tevent.preventDefault();\r\n\t\t\tresetKeyword();\r\n\t\t\tresetBath();\r\n\t\t\tresetBed();\r\n\t\t\tresetRoom();\r\n\t\t\tresetPrice();\r\n\t\t\tresetAreaSize();\r\n\t\t\tresetYearBuilt();\r\n\t\t\tresetType();\r\n\t\t\tresetLocation();\r\n\t\t\tresetStatus();\r\n\t\t\tresetFeature();\r\n\t\t\tresetVerified();\r\n\t\t} );\r\n\t}\r\n};\r\n\r\nconst handleFields = () => {\r\n\trealpressKeyword();\r\n\trealpressBath();\r\n\trealpressBed();\r\n\trealpressRoom();\r\n\trealpressPrice();\r\n\trealpressAreaSize();\r\n\trealpressYearBuilt();\r\n\trealpressType();\r\n\trealpressLocation();\r\n};\r\n\r\nexport { getQuery };\r\nexport default realpressAdvancedSearch;\r\n","const { __ } = wp.i18n;\nconst areaSizeFieldNode = document.querySelector( '.realpress-search-field.area-input' );\nconst realpressAreaSize = () => {\n\tif ( ! areaSizeFieldNode ) {\n\t\treturn;\n\t}\n\n\tconst fieldItemNodes = areaSizeFieldNode.querySelectorAll( '.field-item' );\n\t[ ...fieldItemNodes ].map( ( fieldItemNode ) => {\n\t\tconst displayItemNode = fieldItemNode.querySelector( '.display-item' );\n\t\tconst inputNode = displayItemNode.querySelector( 'input[type=\"text\"]' );\n\t\tconst warningNode = displayItemNode.querySelector( 'span.warning' );\n\t\tconst listNode = fieldItemNode.querySelector( '.list-item ul' );\n\t\tconst listItems = fieldItemNode.querySelectorAll( 'li' );\n\n\t\tinputNode.addEventListener( 'focus', function( event ) {\n\t\t\tfieldItemNode.classList.add( 'active' );\n\n\t\t\t//Filter min, max value\n\t\t\tconst isMinAreaInput = inputNode.name === 'min-area';\n\t\t\tif ( isMinAreaInput ) {\n\t\t\t\tconst maxAreaValue = areaSizeFieldNode.querySelector( 'input[name=\"max-area\"]' ).value;\n\t\t\t\tif ( maxAreaValue === '0' ) {\n\t\t\t\t\tlistNode.style.display = 'none';\n\t\t\t\t} else {\n\t\t\t\t\tlistNode.style.display = 'block';\n\t\t\t\t}\n\n\t\t\t\t[ ...listItems ].map( ( listItem ) => {\n\t\t\t\t\tif ( parseInt( listItem.getAttribute( 'data-value' ) ) >= parseInt( maxAreaValue ) ) {\n\t\t\t\t\t\tlistItem.style.display = 'none';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlistItem.style.display = 'block';\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tconst minAreaValue = areaSizeFieldNode.querySelector( 'input[name=\"min-area\"]' ).value;\n\t\t\t\t[ ...listItems ].map( ( listItem ) => {\n\t\t\t\t\tif ( parseInt( listItem.getAttribute( 'data-value' ) ) <= parseInt( minAreaValue ) ) {\n\t\t\t\t\t\tlistItem.style.display = 'none';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlistItem.style.display = 'block';\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\t[ ...listItems ].map( ( listItem ) => {\n\t\t\tlistItem.addEventListener( 'click', function( event ) {\n\t\t\t\tinputNode.value = listItem.getAttribute( 'data-value' );\n\t\t\t} );\n\t\t} );\n\n\t\tdocument.addEventListener( 'click', function( event ) {\n\t\t\tif ( ! inputNode.contains( event.target ) ) {\n\t\t\t\tfieldItemNode.classList.remove( 'active' );\n\t\t\t}\n\t\t} );\n\n\t\tinputNode.addEventListener( 'change', function() {\n\t\t\tconst value = inputNode.value;\n\t\t\tif ( isNaN( value ) ) {\n\t\t\t\tinputNode.value = '';\n\t\t\t} else {\n\t\t\t\tinputNode.value = value;\n\t\t\t}\n\t\t\twarningNode.innerHTML = '';\n\t\t} );\n\n\t\tinputNode.addEventListener( 'keyup', function() {\n\t\t\tfieldItemNode.classList.add( 'active' );\n\t\t\tlet value = inputNode.value;\n\t\t\tif ( isNaN( value ) ) {\n\t\t\t\twarningNode.innerHTML = __( 'Invalid number', 'realpress' );\n\t\t\t} else {\n\t\t\t\twarningNode.innerHTML = '';\n\t\t\t\tif ( value ) {\n\t\t\t\t\tvalue = +value;\n\t\t\t\t}\n\t\t\t\tinputNode.value = value;\n\t\t\t}\n\t\t} );\n\t} );\n};\n\nconst getMinAreaValue = () => {\n\tif ( ! areaSizeFieldNode ) {\n\t\treturn '';\n\t}\n\n\tconst minAreaNode = areaSizeFieldNode.querySelector( 'input[name=\"min-area\"]' );\n\tif ( minAreaNode && minAreaNode.value ) {\n\t\treturn minAreaNode.value;\n\t}\n\n\treturn '';\n};\n\nconst getMaxAreaValue = () => {\n\tif ( ! areaSizeFieldNode ) {\n\t\treturn '';\n\t}\n\n\tconst maxAreaNode = areaSizeFieldNode.querySelector( 'input[name=\"max-area\"]' );\n\tif ( maxAreaNode && maxAreaNode.value ) {\n\t\treturn maxAreaNode.value;\n\t}\n\n\treturn '';\n};\n\nconst resetAreaSize = () => {\n\tif ( ! areaSizeFieldNode ) {\n\t\treturn;\n\t}\n\n\tconst minAreaNode = areaSizeFieldNode.querySelector( 'input[name=\"min-area\"]' );\n\tconst maxAreaNode = areaSizeFieldNode.querySelector( 'input[name=\"max-area\"]' );\n\tminAreaNode.value = '';\n\tmaxAreaNode.value = '';\n};\n\nexport { getMinAreaValue, getMaxAreaValue, resetAreaSize };\nexport default realpressAreaSize;\n","const { __ } = wp.i18n;\nconst bathField = document.querySelector( '.realpress-search-field.bath' );\nlet selectItemNodes, exactMatchNode, bathInput, toggleBtn, applyBtn;\nconst realpressBath = () => {\n\tif ( ! bathField ) {\n\t\treturn;\n\t}\n\n\tbathInput = bathField.querySelector( 'input[name=\"bath\"]' );\n\ttoggleBtn = bathField.querySelector( '.toggle' );\n\tapplyBtn = bathField.querySelector( '.apply' );\n\n\tselectItemNodes = bathField.querySelectorAll( 'li' );\n\texactMatchNode = bathField.querySelector( '#bath-exact-match' );\n\n\tdocument.addEventListener( 'click', function( event ) {\n\t\tconst target = event.target;\n\n\t\tif ( ! bathField.contains( target ) ) {\n\t\t\tbathField.classList.remove( 'active' );\n\t\t}\n\t\t[ ...selectItemNodes ].map( ( item ) => {\n\t\t\tif ( item.contains( target ) ) {\n\t\t\t\t[ ...selectItemNodes ].map( ( el ) => {\n\t\t\t\t\tif ( el === item ) {\n\t\t\t\t\t\tconst value = el.innerHTML.trim();\n\t\t\t\t\t\tel.classList.add( 'active' );\n\t\t\t\t\t\ttoggleBtn.classList.add( 'has-value' );\n\t\t\t\t\t\tif ( el.getAttribute( 'data-value' ) === '0' ) {\n\t\t\t\t\t\t\tbathInput.value = 'any';\n\t\t\t\t\t\t\ttoggleBtn.innerHTML = __( 'Baths', 'realpress' );\n\t\t\t\t\t\t\ttoggleBtn.classList.remove( 'has-value' );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tbathInput.value = value;\n\t\t\t\t\t\t\ttoggleBtn.innerHTML = value;\n\t\t\t\t\t\t\ttoggleBtn.classList.add( 'has-value' );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tel.classList.remove( 'active' );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t} );\n\n\t//click tom select -> remove bed active status\n\tconst tomSelectNodes = document.querySelectorAll( 'select.realpress-tom-select, select.realpress-custom-select' );\n\tfor ( let i = 0; i < tomSelectNodes.length; i++ ) {\n\t\tconst tomSelectNode = tomSelectNodes[ i ];\n\t\ttomSelectNode.tomselect.on( 'focus', function() {\n\t\t\tbathField.classList.remove( 'active' );\n\t\t} );\n\n\t\ttomSelectNode.tomselect.on( 'change', function() {\n\t\t\tbathField.classList.remove( 'active' );\n\t\t} );\n\t}\n\n\texactMatchNode.addEventListener( 'change', function( event ) {\n\t\tif ( exactMatchNode.checked ) {\n\t\t\tif ( bathInput.value !== 'any' ) {\n\t\t\t\tconst value = bathInput.value.replace( '+', '' );\n\t\t\t\tbathInput.value = value;\n\t\t\t\ttoggleBtn.innerHTML = value;\n\t\t\t\ttoggleBtn.classList.add( 'has-value' );\n\t\t\t}\n\t\t\t[ ...selectItemNodes ].map( ( item ) => {\n\t\t\t\tif ( item.getAttribute( 'data-value' ) !== '0' ) {\n\t\t\t\t\titem.innerHTML = item.getAttribute( 'data-value' );\n\t\t\t\t}\n\t\t\t} );\n\t\t} else {\n\t\t\tif ( bathInput.value !== 'any' ) {\n\t\t\t\tconst value = bathInput.value + '+';\n\t\t\t\tbathInput.value = value;\n\t\t\t\ttoggleBtn.innerHTML = value;\n\t\t\t\ttoggleBtn.classList.add( 'has-value' );\n\t\t\t}\n\n\t\t\t[ ...selectItemNodes ].map( ( item ) => {\n\t\t\t\tif ( item.getAttribute( 'data-value' ) !== '0' ) {\n\t\t\t\t\titem.innerHTML = item.getAttribute( 'data-value' ) + '+';\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n\n\ttoggleBtn.addEventListener( 'click', function( event ) {\n\t\tevent.preventDefault();\n\t\tbathField.classList.toggle( 'active' );\n\t} );\n\n\tapplyBtn.addEventListener( 'click', function( event ) {\n\t\tevent.preventDefault();\n\t\tbathField.classList.remove( 'active' );\n\t} );\n};\n\nconst getBathValue = () => {\n\tif ( ! bathField ) {\n\t\treturn;\n\t}\n\n\tconst bathInput = bathField.querySelector( 'input[name=\"bath\"]' );\n\n\tif ( bathInput && bathInput.value ) {\n\t\tif ( bathInput.value === 'any' ) {\n\t\t\treturn '';\n\t\t}\n\t\treturn bathInput.value;\n\t}\n\n\treturn '';\n};\n\nconst resetBath = () => {\n\tif ( ! bathField ) {\n\t\treturn;\n\t}\n\n\tbathInput = bathField.querySelector( 'input[name=\"bath\"]' );\n\ttoggleBtn = bathField.querySelector( '.toggle' );\n\tbathInput.value = 'any';\n\ttoggleBtn.innerHTML = __( 'Baths', 'realpress' );\n\t[ ...selectItemNodes ].map( ( item ) => {\n\t\tif ( item.getAttribute( 'data-value' ) === '0' ) {\n\t\t\titem.classList.add( 'active' );\n\t\t} else {\n\t\t\titem.classList.remove( 'active' );\n\t\t\titem.innerHTML = item.getAttribute( 'data-value' );\n\t\t\texactMatchNode.checked = true;\n\t\t}\n\t} );\n};\n\nexport { getBathValue, resetBath };\n\nexport default realpressBath;\n","const { __ } = wp.i18n;\nconst bedField = document.querySelector( '.realpress-search-field.bed' );\nlet selectItemNodes, exactMatchNode, bedInput, toggleBtn, applyBtn;\nconst realpressBed = () => {\n\tif ( ! bedField ) {\n\t\treturn;\n\t}\n\n\tbedInput = bedField.querySelector( 'input[name=\"bed\"]' );\n\ttoggleBtn = bedField.querySelector( '.toggle' );\n\tapplyBtn = bedField.querySelector( '.apply' );\n\tselectItemNodes = bedField.querySelectorAll( 'li' );\n\texactMatchNode = bedField.querySelector( '#bed-exact-match' );\n\n\tdocument.addEventListener( 'click', function( event ) {\n\t\tconst target = event.target;\n\n\t\tif ( ! bedField.contains( target ) ) {\n\t\t\tbedField.classList.remove( 'active' );\n\t\t}\n\n\t\t[ ...selectItemNodes ].map( ( item ) => {\n\t\t\tif ( item.contains( target ) ) {\n\t\t\t\t[ ...selectItemNodes ].map( ( el ) => {\n\t\t\t\t\tif ( el === item ) {\n\t\t\t\t\t\tconst value = el.innerHTML.trim();\n\t\t\t\t\t\tel.classList.add( 'active' );\n\t\t\t\t\t\ttoggleBtn.classList.add( 'has-value' );\n\t\t\t\t\t\tif ( el.getAttribute( 'data-value' ) === '0' ) {\n\t\t\t\t\t\t\tbedInput.value = 'any';\n\t\t\t\t\t\t\ttoggleBtn.innerHTML = __( 'Beds', 'realpress' );\n\t\t\t\t\t\t\ttoggleBtn.classList.remove( 'has-value' );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tbedInput.value = value;\n\t\t\t\t\t\t\ttoggleBtn.innerHTML = value;\n\t\t\t\t\t\t\ttoggleBtn.classList.add( 'has-value' );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tel.classList.remove( 'active' );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t} );\n\n\t//click tom select -> remove bed active status\n\tconst tomSelectNodes = document.querySelectorAll( 'select.realpress-tom-select, select.realpress-custom-select' );\n\tfor ( let i = 0; i < tomSelectNodes.length; i++ ) {\n\t\tconst tomSelectNode = tomSelectNodes[ i ];\n\t\ttomSelectNode.tomselect.on( 'focus', function() {\n\t\t\tbedField.classList.remove( 'active' );\n\t\t} );\n\n\t\ttomSelectNode.tomselect.on( 'change', function() {\n\t\t\tbedField.classList.remove( 'active' );\n\t\t} );\n\t}\n\n\texactMatchNode.addEventListener( 'change', function( event ) {\n\t\tif ( exactMatchNode.checked ) {\n\t\t\tif ( bedInput.value !== 'any' ) {\n\t\t\t\tconst value = bedInput.value.replace( '+', '' );\n\t\t\t\tbedInput.value = value;\n\t\t\t\ttoggleBtn.innerHTML = value;\n\t\t\t\ttoggleBtn.classList.add( 'has-value' );\n\t\t\t}\n\t\t\t[ ...selectItemNodes ].map( ( item ) => {\n\t\t\t\tif ( item.getAttribute( 'data-value' ) !== '0' ) {\n\t\t\t\t\titem.innerHTML = item.getAttribute( 'data-value' );\n\t\t\t\t}\n\t\t\t} );\n\t\t} else {\n\t\t\tif ( bedInput.value !== 'any' ) {\n\t\t\t\tconst value = bedInput.value + '+';\n\t\t\t\tbedInput.value = value;\n\t\t\t\ttoggleBtn.innerHTML = value;\n\t\t\t\ttoggleBtn.classList.add( 'has-value' );\n\t\t\t}\n\n\t\t\t[ ...selectItemNodes ].map( ( item ) => {\n\t\t\t\tif ( item.getAttribute( 'data-value' ) !== '0' ) {\n\t\t\t\t\titem.innerHTML = item.getAttribute( 'data-value' ) + '+';\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n\n\ttoggleBtn.addEventListener( 'click', function( event ) {\n\t\tevent.preventDefault();\n\t\tbedField.classList.toggle( 'active' );\n\t} );\n\n\tapplyBtn.addEventListener( 'click', function( event ) {\n\t\tevent.preventDefault();\n\t\tbedField.classList.remove( 'active' );\n\t} );\n};\n\nconst getBedValue = () => {\n\tif ( ! bedField ) {\n\t\treturn;\n\t}\n\n\tconst bedInput = bedField.querySelector( 'input[name=\"bed\"]' );\n\n\tif ( bedInput && bedInput.value ) {\n\t\tif ( bedInput.value === 'any' ) {\n\t\t\treturn '';\n\t\t}\n\t\treturn bedInput.value;\n\t}\n\n\treturn '';\n};\n\nconst resetBed = () => {\n\tif ( ! bedField ) {\n\t\treturn;\n\t}\n\n\tbedInput = bedField.querySelector( 'input[name=\"bed\"]' );\n\ttoggleBtn = bedField.querySelector( '.toggle' );\n\tbedInput.value = 'any';\n\ttoggleBtn.innerHTML = __( 'Beds', 'realpress' );\n\n\t[ ...selectItemNodes ].map( ( item ) => {\n\t\tif ( item.getAttribute( 'data-value' ) === '0' ) {\n\t\t\titem.classList.add( 'active' );\n\t\t} else {\n\t\t\titem.classList.remove( 'active' );\n\t\t\titem.innerHTML = item.getAttribute( 'data-value' );\n\t\t\texactMatchNode.checked = true;\n\t\t}\n\t} );\n};\n\nexport { getBedValue, resetBed };\n\nexport default realpressBed;\n","const { __ } = wp.i18n;\r\nconst featureField = document.querySelector( '.realpress-search-field.feature' );\r\n\r\nconst getFeatureValue = () => {\r\n\tif ( ! featureField ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tconst featureNode = featureField.querySelector( 'select' );\r\n\tif ( featureNode.options ) {\r\n\t\tlet termId = [];\r\n\t\tconst options = featureNode.options;\r\n\t\t[ ...options ].map( ( option ) => {\r\n\t\t\tif ( option.selected && option.value ) {\r\n\t\t\t\ttermId = [ ...termId, option.value ];\r\n\t\t\t}\r\n\t\t} );\r\n\r\n\t\treturn termId.toString();\r\n\t}\r\n\r\n\treturn '';\r\n};\r\n\r\nconst resetFeature = () => {\r\n\tif ( ! featureField ) {\r\n\t\treturn '';\r\n\t}\r\n\r\n\tconst selectNode = featureField.querySelector( 'select' );\r\n\tselectNode.tomselect.setValue( '' );\r\n};\r\n\r\nexport { getFeatureValue, resetFeature };\r\n","import { addQueryArgs } from '@wordpress/url';\nimport { getQuery } from '../advanced-search';\n\nconst { __ } = wp.i18n;\nconst restUrl = REALPRESS_GLOBAL_OBJECT.rest_url || '';\nconst restNamespace = REALPRESS_GLOBAL_OBJECT.rest_namespace || '';\n\nconst keywordFieldNode = document.querySelector( '.realpress-search-field.keyword' );\nlet keywordSearchNode, suggestNode, suggestResult, suggestData, suggestTimeoutId;\nconst realpressKeyword = () => {\n\tif ( ! keywordFieldNode ) {\n\t\treturn;\n\t}\n\n\thandleEnterEvent();\n\tsearchSuggestion();\n};\n\nconst handleEnterEvent = () => {\n\tdocument.addEventListener( 'keyup', function( event ) {\n\t\tconst target = event.target;\n\n\t\tif ( target.name !== 'keyword' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst advancedSearch = target.closest( '.realpress-advanced-search' );\n\n\t\tif ( ! advancedSearch ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst searchBtn = advancedSearch.querySelector( '.realpress-search' );\n\t\tif ( ! searchBtn ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( event.keyCode === 13 && target.value ) {\n\t\t\tsearchBtn.click();\n\t\t}\n\t} );\n};\n\nconst searchSuggestion = () => {\n\tkeywordSearchNode = keywordFieldNode.querySelector( '.realpress-search-keyword' );\n\n\tif ( ! keywordSearchNode ) {\n\t\treturn;\n\t}\n\tsuggestNode = keywordSearchNode.querySelector( 'input[name=\"keyword\"][data-suggest=\"on\"]' );\n\tif ( ! suggestNode ) {\n\t\treturn;\n\t}\n\n\tsuggestResult = keywordFieldNode.querySelector( '.realpress-suggest-result' );\n\tsuggestNode.addEventListener( 'input', function() {\n\t\tif ( this.value.length < 3 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfetchSuggestSearchData();\n\t} );\n\n\tsuggestNode.addEventListener( 'focus', function() {\n\t\tif ( suggestData ) {\n\t\t\tsuggestResult.innerHTML = suggestData;\n\t\t\tsuggestResult.classList.add( 'show' );\n\t\t} else {\n\t\t\tfetchSuggestSearchData();\n\t\t\tsuggestResult.classList.remove( 'show' );\n\t\t}\n\t} );\n\tdocument.addEventListener( 'click', function( event ) {\n\t\tif ( ! suggestNode.contains( event.target ) ) {\n\t\t\tsuggestResult.innerHTML = '';\n\t\t\tsuggestResult.classList.remove( 'show' );\n\t\t}\n\t} );\n};\n\nconst getSuggestResult = ( res ) => {\n\tconst properties = res.data.property;\n\tlet result = '';\n\n\tfor ( let i = 0; i < properties.length; i++ ) {\n\t\tconst property = properties[ i ];\n\t\tresult += `
  • ${ property.title }
  • `;\n\t}\n\n\tif ( Object.hasOwn( res.data, 'next_page' ) ) {\n\t\tresult += ``;\n\t}\n\treturn result;\n};\n\nconst fetchSuggestSearchData = () => {\n\t//Clear all calback before\n\tclearTimeout( suggestTimeoutId );\n\n\tconst keyword = suggestNode.value;\n\tconst spinnerIcon = keywordSearchNode.querySelector( 'i.rp-spinner' );\n\tif ( ! keyword ) {\n\t\tif ( spinnerIcon ) {\n\t\t\tkeywordSearchNode.querySelector( 'i.rp-spinner' ).remove();\n\t\t}\n\t\tsuggestData = '';\n\t\tsuggestResult.innerHTML = '';\n\t\tsuggestResult.classList.remove( 'show' );\n\t\treturn;\n\t}\n\tif ( ! spinnerIcon ) {\n\t\tkeywordSearchNode.insertAdjacentHTML( 'beforeend', '' );\n\t}\n\n\tlet query = getQuery();\n\tquery = { ...query, keyword, template: 'search_suggest' };\n\tsuggestTimeoutId = setTimeout( () => {\n\t\tfetch( addQueryArgs( restUrl + restNamespace + '/properties', query ), { method: 'GET' } )\n\t\t\t.then( ( res ) => res.json() )\n\t\t\t.then( ( res ) => {\n\t\t\t\tif ( res.data.property ) {\n\t\t\t\t\tsuggestData = getSuggestResult( res );\n\t\t\t\t\tsuggestResult.innerHTML = suggestData;\n\t\t\t\t\tsuggestResult.classList.add( 'show' );\n\t\t\t\t} else if ( res.msg ) {\n\t\t\t\t\tsuggestData = '';\n\t\t\t\t\tsuggestResult.innerHTML = '';\n\t\t\t\t\tsuggestResult.classList.remove( 'show' );\n\t\t\t\t}\n\t\t\t} ).catch( ( err ) => {\n\t\t\t\tconsole.log( err );\n\t\t\t} ).finally( () => {\n\t\t\t\tconst spinnerIcon = keywordSearchNode.querySelector( 'i.rp-spinner' );\n\t\t\t\tif ( spinnerIcon ) {\n\t\t\t\t\tkeywordSearchNode.querySelector( 'i.rp-spinner' ).remove();\n\t\t\t\t}\n\t\t\t\tclearTimeout( suggestTimeoutId );\n\t\t\t} );\n\t}, 1000 );\n};\n\nconst getKeywordValue = () => {\n\tif ( ! keywordFieldNode ) {\n\t\treturn '';\n\t}\n\n\tconst keywordNode = keywordFieldNode.querySelector( 'input[name=\"keyword\"]' );\n\tif ( keywordNode && keywordNode.value ) {\n\t\treturn keywordNode.value;\n\t}\n\n\treturn '';\n};\n\nconst resetKeyword = () => {\n\tif ( ! keywordFieldNode ) {\n\t\treturn '';\n\t}\n\n\tkeywordFieldNode.querySelector( 'input[name=\"keyword\"]' ).value = '';\n};\n\nexport { getKeywordValue, resetKeyword };\nexport default realpressKeyword;\n","const { __ } = wp.i18n;\nconst locationField = document.querySelector( '.realpress-search-field.location' );\nlet toggleBtn, applyBtn, addClass;\n\nconst realpressLocation = () => {\n\tif ( ! locationField ) {\n\t\treturn;\n\t}\n\n\ttoggleBtn = locationField.querySelector( '.toggle' );\n\tapplyBtn = locationField.querySelector( '.apply' );\n\n\tconst selectAllNode = locationField.querySelector( '.all' );\n\tconst selectAllInputNode = selectAllNode.querySelector( 'input' );\n\tconst termNodes = locationField.querySelectorAll( '.item' );\n\n\tselectAllInputNode.addEventListener( 'change', function( event ) {\n\t\tif ( event.target.checked ) {\n\t\t\ttoggleBtn.innerHTML = sprintf( __( 'Location (%s)', 'realpress' ), termNodes.length );\n\t\t\ttoggleBtn.classList.add( 'has-value' );\n\t\t\t[ ...termNodes ].map( ( termNode ) => {\n\t\t\t\ttermNode.querySelector( 'input' ).checked = true;\n\t\t\t} );\n\t\t} else {\n\t\t\ttoggleBtn.innerHTML = __( 'Location', 'realpress' );\n\t\t\ttoggleBtn.classList.remove( 'has-value' );\n\t\t\t[ ...termNodes ].map( ( termNode ) => {\n\t\t\t\ttermNode.querySelector( 'input' ).checked = false;\n\t\t\t} );\n\t\t}\n\t} );\n\n\tlet checkedAll = true;\n\tfor ( let i = 0; i < termNodes.length; i++ ) {\n\t\tconst inputNode = termNodes[ i ].querySelector( 'input' );\n\t\tif ( ! inputNode.checked ) {\n\t\t\tcheckedAll = false;\n\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tselectAllInputNode.checked = checkedAll;\n\n\t[ ...termNodes ].map( ( termNode ) => {\n\t\tconst inputNode = termNode.querySelector( 'input' );\n\n\t\tinputNode.addEventListener( 'change', function( event ) {\n\t\t\tconst termCheckedNodes = locationField.querySelectorAll( '.item input:checked' );\n\t\t\tif ( termCheckedNodes.length ) {\n\t\t\t\ttoggleBtn.innerHTML = sprintf( __( 'Location (%s)', 'realpress' ), termCheckedNodes.length );\n\t\t\t\ttoggleBtn.classList.add( 'has-value' );\n\t\t\t} else {\n\t\t\t\ttoggleBtn.innerHTML = __( 'Location', 'realpress' );\n\t\t\t\ttoggleBtn.classList.remove( 'has-value' );\n\t\t\t}\n\t\t} );\n\t} );\n\n\t[ ...termNodes ].map( ( termNode ) => {\n\t\tconst inputNode = termNode.querySelector( 'input' );\n\n\t\tinputNode.addEventListener( 'change', function( event ) {\n\t\t\tif ( event.target.checked ) {\n\t\t\t\tlet checked = true;\n\t\t\t\tfor ( let i = 0; i < termNodes.length; i++ ) {\n\t\t\t\t\tconst inputNode = termNodes[ i ].querySelector( 'input' );\n\t\t\t\t\tif ( ! inputNode.checked ) {\n\t\t\t\t\t\tchecked = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tselectAllInputNode.checked = checked;\n\t\t\t} else {\n\t\t\t\tselectAllInputNode.checked = false;\n\t\t\t}\n\t\t} );\n\t} );\n\n\ttoggleBtn.addEventListener( 'click', function( event ) {\n\t\tevent.preventDefault();\n\t\tlocationField.classList.toggle( 'active' );\n\t} );\n\n\tapplyBtn.addEventListener( 'click', function( event ) {\n\t\tevent.preventDefault();\n\t\tlocationField.classList.remove( 'active' );\n\t} );\n\n\tdocument.addEventListener( 'click', function( event ) {\n\t\tconst target = event.target;\n\n\t\tif ( ! locationField.contains( target ) ) {\n\t\t\tlocationField.classList.remove( 'active' );\n\t\t}\n\t} );\n\n\t//click tom select -> remove location active status\n\tconst tomSelectNodes = document.querySelectorAll( 'select.realpress-tom-select, select.realpress-custom-select' );\n\tfor ( let i = 0; i < tomSelectNodes.length; i++ ) {\n\t\tconst tomSelectNode = tomSelectNodes[ i ];\n\t\ttomSelectNode.tomselect.on( 'focus', function() {\n\t\t\tlocationField.classList.remove( 'active' );\n\t\t} );\n\n\t\ttomSelectNode.tomselect.on( 'change', function() {\n\t\t\tlocationField.classList.remove( 'active' );\n\t\t} );\n\t}\n};\n\nconst getLocationValue = () => {\n\tif ( ! locationField ) {\n\t\treturn '';\n\t}\n\n\tconst termNodes = locationField.querySelectorAll( '.parent, .child' );\n\tlet termId = [];\n\t[ ...termNodes ].map( ( termNode ) => {\n\t\tconst inputNode = termNode.querySelector( 'input[type=checkbox]:checked' );\n\t\tif ( inputNode ) {\n\t\t\ttermId = [ ...termId, inputNode.value ];\n\t\t}\n\t} );\n\n\treturn termId.toString();\n};\n\nconst resetLocation = () => {\n\tif ( ! locationField ) {\n\t\treturn;\n\t}\n\n\ttoggleBtn = locationField.querySelector( '.toggle' );\n\ttoggleBtn.innerHTML = __( 'Location', 'realpress' );\n\tconst selectAllNode = locationField.querySelector( '.all' );\n\tconst selectAllInputNode = selectAllNode.querySelector( 'input' );\n\tselectAllInputNode.checked = false;\n\tconst termNodes = locationField.querySelectorAll( '.item' );\n\t[ ...termNodes ].map( ( termNode ) => {\n\t\ttermNode.querySelector( 'input' ).checked = false;\n\t} );\n};\n\nexport { getLocationValue, resetLocation };\nexport default realpressLocation;\n","import { renderPrice } from '../../../../mixins/price';\nimport 'nouislider';\n\nconst { __ } = wp.i18n;\nlet minPrice, maxPrice, step;\n\nconst priceFieldNode = document.querySelector( '.realpress-search-field.price' );\nconst realpressPrice = () => {\n\tif ( ! priceFieldNode ) {\n\t\treturn;\n\t}\n\tminPrice = priceFieldNode.getAttribute( 'data-min' );\n\tmaxPrice = priceFieldNode.getAttribute( 'data-max' );\n\tstep = priceFieldNode.getAttribute( 'data-step' );\n\n\tif ( minPrice === '' || maxPrice === '' || step === '' ) {\n\t\treturn;\n\t}\n\tpriceSlider();\n\tpriceInput();\n};\n\nconst priceSlider = () => {\n\tif ( ! priceFieldNode.classList.contains( 'price-slider' ) ) {\n\t\treturn;\n\t}\n\n\tconst minPriceNode = document.getElementById( 'realpress-min-price' );\n\tconst maxPriceNode = document.getElementById( 'realpress-max-price' );\n\tconst priceSliderNode = document.getElementById( 'realpress-search-price' );\n\tconst start = minPriceNode.value || minPrice;\n\tconst end = maxPriceNode.value || maxPrice;\n\tstep = parseInt( step );\n\tnoUiSlider.create( priceSliderNode, {\n\t\tstart: [ parseInt( start ), parseInt( end ) ],\n\t\tconnect: true,\n\t\tstep,\n\t\ttooltips: false,\n\t\trange: {\n\t\t\tmin: parseInt( minPrice ), max: parseInt( maxPrice ),\n\t\t},\n\t\t// direction: 'lt',\n\t} );\n\n\tpriceSliderNode.noUiSlider.on( 'update', function( values, handle, unencoded ) {\n\t\tminPriceNode.value = parseInt( values[ 0 ] );\n\t\tmaxPriceNode.value = parseInt( values[ 1 ] );\n\t\tpriceFieldNode.querySelector( '.min' ).innerHTML = renderPrice( values[ 0 ] );\n\t\tpriceFieldNode.querySelector( '.max' ).innerHTML = renderPrice( values[ 1 ] );\n\t} );\n};\n\nconst priceInput = () => {\n\tif ( ! priceFieldNode.classList.contains( 'price-input' ) ) {\n\t\treturn;\n\t}\n\n\tconst fieldItemNodes = priceFieldNode.querySelectorAll( '.field-item' );\n\t[ ...fieldItemNodes ].map( ( fieldItemNode ) => {\n\t\tconst displayItemNode = fieldItemNode.querySelector( '.display-item' );\n\t\tconst inputNode = displayItemNode.querySelector( 'input[type=\"text\"]' );\n\t\tconst warningNode = displayItemNode.querySelector( 'span.warning' );\n\t\tconst listNode = fieldItemNode.querySelector( '.list-item ul' );\n\t\tconst listItems = fieldItemNode.querySelectorAll( 'li' );\n\n\t\tinputNode.addEventListener( 'focus', function( event ) {\n\t\t\tfieldItemNode.classList.add( 'active' );\n\n\t\t\t//Filter min, max value\n\t\t\tconst isMinPriceInput = inputNode.name === 'min-price';\n\t\t\tif ( isMinPriceInput ) {\n\t\t\t\tconst maxPriceValue = priceFieldNode.querySelector( 'input[name=\"max-price\"]' ).value;\n\n\t\t\t\tif ( maxPriceValue === '0' ) {\n\t\t\t\t\tlistNode.style.display = 'none';\n\t\t\t\t} else {\n\t\t\t\t\tlistNode.style.display = 'block';\n\t\t\t\t}\n\n\t\t\t\t[ ...listItems ].map( ( listItem ) => {\n\t\t\t\t\tif ( parseInt( listItem.getAttribute( 'data-value' ) ) >= parseInt( maxPriceValue ) ) {\n\t\t\t\t\t\tlistItem.style.display = 'none';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlistItem.style.display = 'block';\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tconst minPriceValue = priceFieldNode.querySelector( 'input[name=\"min-price\"]' ).value;\n\t\t\t\t[ ...listItems ].map( ( listItem ) => {\n\t\t\t\t\tif ( parseInt( listItem.getAttribute( 'data-value' ) ) <= parseInt( minPriceValue ) ) {\n\t\t\t\t\t\tlistItem.style.display = 'none';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlistItem.style.display = 'block';\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\t[ ...listItems ].map( ( listItem ) => {\n\t\t\tlistItem.addEventListener( 'click', function( event ) {\n\t\t\t\tinputNode.value = listItem.getAttribute( 'data-value' );\n\t\t\t} );\n\t\t} );\n\n\t\tdocument.addEventListener( 'click', function( event ) {\n\t\t\tif ( ! inputNode.contains( event.target ) ) {\n\t\t\t\tfieldItemNode.classList.remove( 'active' );\n\t\t\t}\n\t\t} );\n\n\t\tinputNode.addEventListener( 'change', function() {\n\t\t\tconst value = inputNode.value;\n\t\t\tif ( isNaN( value ) ) {\n\t\t\t\tinputNode.value = '';\n\t\t\t} else {\n\t\t\t\tinputNode.value = value;\n\t\t\t}\n\t\t\twarningNode.innerHTML = '';\n\t\t} );\n\n\t\tinputNode.addEventListener( 'keyup', function() {\n\t\t\tfieldItemNode.classList.add( 'active' );\n\t\t\tlet value = inputNode.value;\n\t\t\tif ( isNaN( value ) ) {\n\t\t\t\twarningNode.innerHTML = __( 'Invalid number', 'realpress' );\n\t\t\t} else {\n\t\t\t\twarningNode.innerHTML = '';\n\t\t\t\tif ( value ) {\n\t\t\t\t\tvalue = +value;\n\t\t\t\t}\n\t\t\t\tinputNode.value = value;\n\t\t\t}\n\t\t} );\n\t} );\n};\n\nconst getMinPriceValue = () => {\n\tif ( ! priceFieldNode ) {\n\t\treturn '';\n\t}\n\n\tconst minPriceNode = priceFieldNode.querySelector( 'input[name=\"min-price\"]' );\n\tif ( minPriceNode && minPriceNode.value ) {\n\t\treturn minPriceNode.value;\n\t}\n\n\treturn '';\n};\n\nconst getMaxPriceValue = () => {\n\tif ( ! priceFieldNode ) {\n\t\treturn '';\n\t}\n\n\tconst maxPriceNode = priceFieldNode.querySelector( 'input[name=\"max-price\"]' );\n\tif ( maxPriceNode && maxPriceNode.value ) {\n\t\treturn maxPriceNode.value;\n\t}\n\n\treturn '';\n};\n\nconst resetPrice = () => {\n\tif ( ! priceFieldNode ) {\n\t\treturn '';\n\t}\n\n\tif ( priceFieldNode.classList.contains( 'price-slider' ) ) {\n\t\tconst priceSliderNode = document.getElementById( 'realpress-search-price' );\n\t\tminPrice = priceFieldNode.getAttribute( 'data-min' );\n\t\tmaxPrice = priceFieldNode.getAttribute( 'data-max' );\n\n\t\tpriceSliderNode.noUiSlider.updateOptions( {\n\t\t\tstart: [ parseInt( minPrice ), parseInt( maxPrice ) ],\n\t\t} );\n\t}\n\n\tif ( priceFieldNode.classList.contains( 'price-input' ) ) {\n\t\tconst minPriceNode = priceFieldNode.querySelector( 'input[name=\"min-price\"]' );\n\t\tconst maxPriceNode = priceFieldNode.querySelector( 'input[name=\"max-price\"]' );\n\n\t\tminPriceNode.value = '';\n\t\tmaxPriceNode.value = '';\n\t}\n};\n\nexport { getMinPriceValue, getMaxPriceValue, resetPrice };\nexport default realpressPrice;\n","import TomSelect from 'tom-select';\n\nconst { __ } = wp.i18n;\nconst roomField = document.querySelector( '.realpress-search-field.room' );\nlet selectItemNodes, exactMatchNode, roomInput, toggleBtn, applyBtn;\nconst realpressRoom = () => {\n\tif ( ! roomField ) {\n\t\treturn;\n\t}\n\n\troomInput = roomField.querySelector( 'input[name=\"room\"]' );\n\ttoggleBtn = roomField.querySelector( '.toggle' );\n\tapplyBtn = roomField.querySelector( '.apply' );\n\n\tselectItemNodes = roomField.querySelectorAll( 'li' );\n\texactMatchNode = roomField.querySelector( '#room-exact-match' );\n\n\tdocument.addEventListener( 'click', function( event ) {\n\t\tconst target = event.target;\n\n\t\tif ( ! roomField.contains( target ) ) {\n\t\t\troomField.classList.remove( 'active' );\n\t\t}\n\n\t\t[ ...selectItemNodes ].map( ( item ) => {\n\t\t\tif ( item.contains( target ) ) {\n\t\t\t\t[ ...selectItemNodes ].map( ( el ) => {\n\t\t\t\t\tif ( el === item ) {\n\t\t\t\t\t\tconst value = el.innerHTML.trim();\n\t\t\t\t\t\tel.classList.add( 'active' );\n\t\t\t\t\t\ttoggleBtn.classList.add( 'has-value' );\n\t\t\t\t\t\tif ( el.getAttribute( 'data-value' ) === '0' ) {\n\t\t\t\t\t\t\troomInput.value = 'any';\n\t\t\t\t\t\t\ttoggleBtn.innerHTML = __( 'Rooms', 'realpress' );\n\t\t\t\t\t\t\ttoggleBtn.classList.remove( 'has-value' );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\troomInput.value = value;\n\t\t\t\t\t\t\ttoggleBtn.innerHTML = value;\n\t\t\t\t\t\t\ttoggleBtn.classList.add( 'has-value' );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tel.classList.remove( 'active' );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t} );\n\n\t//click tom select -> remove room active status\n\tconst tomSelectNodes = document.querySelectorAll( 'select.realpress-tom-select, select.realpress-custom-select' );\n\tfor ( let i = 0; i < tomSelectNodes.length; i++ ) {\n\t\tconst tomSelectNode = tomSelectNodes[ i ];\n\t\ttomSelectNode.tomselect.on( 'focus', function() {\n\t\t\troomField.classList.remove( 'active' );\n\t\t} );\n\n\t\ttomSelectNode.tomselect.on( 'change', function() {\n\t\t\troomField.classList.remove( 'active' );\n\t\t} );\n\t}\n\n\n\texactMatchNode.addEventListener( 'change', function( event ) {\n\t\tif ( exactMatchNode.checked ) {\n\t\t\tif ( roomInput.value !== 'any' ) {\n\t\t\t\tconst value = roomInput.value.replace( '+', '' );\n\t\t\t\troomInput.value = value;\n\t\t\t\ttoggleBtn.innerHTML = value;\n\t\t\t\ttoggleBtn.classList.add( 'has-value' );\n\t\t\t}\n\t\t\t[ ...selectItemNodes ].map( ( item ) => {\n\t\t\t\tif ( item.getAttribute( 'data-value' ) !== '0' ) {\n\t\t\t\t\titem.innerHTML = item.getAttribute( 'data-value' );\n\t\t\t\t}\n\t\t\t} );\n\t\t} else {\n\t\t\tif ( roomInput.value !== 'any' ) {\n\t\t\t\tconst value = roomInput.value + '+';\n\t\t\t\troomInput.value = value;\n\t\t\t\ttoggleBtn.innerHTML = value;\n\t\t\t\ttoggleBtn.classList.add( 'has-value' );\n\t\t\t}\n\n\t\t\t[ ...selectItemNodes ].map( ( item ) => {\n\t\t\t\tif ( item.getAttribute( 'data-value' ) !== '0' ) {\n\t\t\t\t\titem.innerHTML = item.getAttribute( 'data-value' ) + '+';\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n\n\ttoggleBtn.addEventListener( 'click', function( event ) {\n\t\tevent.preventDefault();\n\t\troomField.classList.toggle( 'active' );\n\t} );\n\n\tapplyBtn.addEventListener( 'click', function( event ) {\n\t\tevent.preventDefault();\n\t\troomField.classList.remove( 'active' );\n\t} );\n};\n\nconst getRoomValue = () => {\n\tif ( ! roomField ) {\n\t\treturn '';\n\t}\n\n\tconst roomInput = roomField.querySelector( 'input[name=\"room\"]' );\n\tif ( roomInput && roomInput.value ) {\n\t\tif ( roomInput.value === 'any' ) {\n\t\t\treturn '';\n\t\t}\n\t\treturn roomInput.value;\n\t}\n\n\treturn '';\n};\n\nconst resetRoom = () => {\n\tif ( ! roomField ) {\n\t\treturn;\n\t}\n\n\troomInput = roomField.querySelector( 'input[name=\"room\"]' );\n\ttoggleBtn = roomField.querySelector( '.toggle' );\n\troomInput.value = 'any';\n\ttoggleBtn.innerHTML = __( 'Rooms', 'realpress' );\n\n\t[ ...selectItemNodes ].map( ( item ) => {\n\t\tif ( item.getAttribute( 'data-value' ) === '0' ) {\n\t\t\titem.classList.add( 'active' );\n\t\t} else {\n\t\t\titem.classList.remove( 'active' );\n\t\t\titem.innerHTML = item.getAttribute( 'data-value' );\n\t\t\texactMatchNode.checked = true;\n\t\t}\n\t} );\n};\n\nexport { getRoomValue, resetRoom };\nexport default realpressRoom;\n","const { __ } = wp.i18n;\r\nconst statusField = document.querySelector( '.realpress-search-field.status' );\r\n\r\nconst getStatusValue = () => {\r\n\tif ( ! statusField ) {\r\n\t\treturn '';\r\n\t}\r\n\r\n\tif ( statusField.classList.contains( 'status-select' ) ) {\r\n\t\tconst selectNode = statusField.querySelector( 'select[name=status]' );\r\n\t\tconst value = selectNode.tomselect.getValue();\r\n\t\tif ( value === '0' ) {\r\n\t\t\treturn '';\r\n\t\t}\r\n\t\treturn selectNode.tomselect.getValue();\r\n\t}\r\n\tif ( statusField.classList.contains( 'status-input' ) ) {\r\n\t\tconst radioNode = statusField.querySelector( 'input:checked' );\r\n\t\tif ( radioNode.value === 'all' ) {\r\n\t\t\tlet termId = [];\r\n\t\t\tconst inputNodes = statusField.querySelectorAll( '.item input' );\r\n\t\t\t[ ...inputNodes ].map( ( inputNode ) => {\r\n\t\t\t\ttermId = [ ...termId, inputNode.value ];\r\n\t\t\t} );\r\n\t\t\treturn termId.toString();\r\n\t\t}\r\n\t\treturn radioNode.value;\r\n\t}\r\n\r\n\treturn '';\r\n};\r\n\r\nconst resetStatus = () => {\r\n\tif ( ! statusField ) {\r\n\t\treturn '';\r\n\t}\r\n\r\n\tif ( statusField.classList.contains( 'status-input' ) ) {\r\n\t\tconst radioNodes = statusField.querySelectorAll( 'input' );\r\n\t\t[ ...radioNodes ].map( ( radioNode ) => {\r\n\t\t\tif ( radioNode.value === 'all' ) {\r\n\t\t\t\tradioNode.checked = true;\r\n\t\t\t} else {\r\n\t\t\t\tradioNode.checked = false;\r\n\t\t\t}\r\n\t\t} );\r\n\t}\r\n\r\n\tif ( statusField.classList.contains( 'status-select' ) ) {\r\n\t\tconst selectNode = statusField.querySelector( 'select[name=status]' );\r\n\t\tselectNode.tomselect.setValue( 'all' );\r\n\t}\r\n};\r\n\r\nexport { getStatusValue, resetStatus };\r\n","const { __ } = wp.i18n;\nconst typeField = document.querySelector( '.realpress-search-field.type' );\nlet toggleBtn, applyBtn, btnText;\n\nconst realpressType = () => {\n\tif ( ! typeField ) {\n\t\treturn;\n\t}\n\n\ttoggleBtn = typeField.querySelector( '.toggle' );\n\tapplyBtn = typeField.querySelector( '.apply' );\n\tconst selectAllNode = typeField.querySelector( '.all' );\n\tconst selectAllInputNode = selectAllNode.querySelector( 'input' );\n\tconst termNodes = typeField.querySelectorAll( '.item' );\n\tbtnText = toggleBtn.innerHTML.replace( /\\((.+?)\\)/g, '' );\n\n\tselectAllInputNode.addEventListener( 'change', function( event ) {\n\t\tif ( event.target.checked ) {\n\t\t\ttoggleBtn.innerHTML = btnText + ' (' + termNodes.length + ')';\n\t\t\ttoggleBtn.classList.add( 'has-value' );\n\t\t\t[ ...termNodes ].map( ( termNode ) => {\n\t\t\t\ttermNode.querySelector( 'input' ).checked = true;\n\t\t\t} );\n\t\t} else {\n\t\t\ttoggleBtn.innerHTML = btnText;\n\t\t\ttoggleBtn.classList.remove( 'has-value' );\n\t\t\t[ ...termNodes ].map( ( termNode ) => {\n\t\t\t\ttermNode.querySelector( 'input' ).checked = false;\n\t\t\t} );\n\t\t}\n\t} );\n\n\tlet checkedAll = true;\n\tfor ( let i = 0; i < termNodes.length; i++ ) {\n\t\tconst inputNode = termNodes[ i ].querySelector( 'input' );\n\t\tif ( ! inputNode.checked ) {\n\t\t\tcheckedAll = false;\n\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tselectAllInputNode.checked = checkedAll;\n\n\t[ ...termNodes ].map( ( termNode ) => {\n\t\tconst inputNode = termNode.querySelector( 'input' );\n\n\t\tinputNode.addEventListener( 'change', function( event ) {\n\t\t\tconst termCheckedNodes = typeField.querySelectorAll( '.item input:checked' );\n\n\t\t\tif ( termCheckedNodes.length ) {\n\t\t\t\ttoggleBtn.innerHTML = btnText + ' (' + termCheckedNodes.length + ')';\n\t\t\t\ttoggleBtn.classList.add( 'has-value' );\n\t\t\t} else {\n\t\t\t\ttoggleBtn.innerHTML = btnText;\n\t\t\t\ttoggleBtn.classList.remove( 'has-value' );\n\t\t\t}\n\t\t} );\n\t} );\n\n\t[ ...termNodes ].map( ( termNode ) => {\n\t\tconst inputNode = termNode.querySelector( 'input' );\n\n\t\tinputNode.addEventListener( 'change', function( event ) {\n\t\t\tif ( event.target.checked ) {\n\t\t\t\tlet checked = true;\n\t\t\t\tfor ( let i = 0; i < termNodes.length; i++ ) {\n\t\t\t\t\tconst inputNode = termNodes[ i ].querySelector( 'input' );\n\t\t\t\t\tif ( ! inputNode.checked ) {\n\t\t\t\t\t\tchecked = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tselectAllInputNode.checked = checked;\n\t\t\t} else {\n\t\t\t\tselectAllInputNode.checked = false;\n\t\t\t}\n\t\t} );\n\t} );\n\n\ttoggleBtn.addEventListener( 'click', function( event ) {\n\t\tevent.preventDefault();\n\t\ttypeField.classList.toggle( 'active' );\n\t} );\n\n\tapplyBtn.addEventListener( 'click', function( event ) {\n\t\tevent.preventDefault();\n\t\ttypeField.classList.remove( 'active' );\n\t} );\n\n\tdocument.addEventListener( 'click', function( event ) {\n\t\tconst target = event.target;\n\n\t\tif ( ! typeField.contains( target ) ) {\n\t\t\ttypeField.classList.remove( 'active' );\n\t\t}\n\t} );\n\n\t//click tom select -> remove type active status\n\tconst tomSelectNodes = document.querySelectorAll( 'select.realpress-tom-select, select.realpress-custom-select' );\n\tfor ( let i = 0; i < tomSelectNodes.length; i++ ) {\n\t\tconst tomSelectNode = tomSelectNodes[ i ];\n\t\ttomSelectNode.tomselect.on( 'focus', function() {\n\t\t\ttypeField.classList.remove( 'active' );\n\t\t} );\n\n\t\ttomSelectNode.tomselect.on( 'change', function() {\n\t\t\ttypeField.classList.remove( 'active' );\n\t\t} );\n\t}\n};\n\nconst getTypeValue = () => {\n\tif ( ! typeField ) {\n\t\treturn '';\n\t}\n\n\tconst termNodes = typeField.querySelectorAll( '.parent, .child' );\n\tlet termId = [];\n\t[ ...termNodes ].map( ( termNode ) => {\n\t\tconst inputNode = termNode.querySelector( 'input[type=checkbox]:checked' );\n\t\tif ( inputNode ) {\n\t\t\ttermId = [ ...termId, inputNode.value ];\n\t\t}\n\t} );\n\n\treturn termId.toString();\n};\n\nconst resetType = () => {\n\tif ( ! typeField ) {\n\t\treturn;\n\t}\n\n\ttoggleBtn = typeField.querySelector( '.toggle' );\n\ttoggleBtn.innerHTML = btnText;\n\tconst selectAllNode = typeField.querySelector( '.all' );\n\tconst selectAllInputNode = selectAllNode.querySelector( 'input' );\n\tselectAllInputNode.checked = false;\n\tconst termNodes = typeField.querySelectorAll( '.item' );\n\t[ ...termNodes ].map( ( termNode ) => {\n\t\ttermNode.querySelector( 'input' ).checked = false;\n\t} );\n};\n\nexport { getTypeValue, resetType };\nexport default realpressType;\n","const { __ } = wp.i18n;\r\nconst verifiedField = document.querySelector( '.realpress-search-field.verified' );\r\n\r\nconst realpressVerified = () => {\r\n\r\n};\r\n\r\nconst getVerifiedValue = () => {\r\n\tif ( ! verifiedField ) {\r\n\t\treturn '';\r\n\t}\r\n\r\n\tif ( verifiedField.querySelector( 'input:checked' ) ) {\r\n\t\treturn 'yes';\r\n\t}\r\n\r\n\treturn '';\r\n};\r\n\r\nconst resetVerified = () => {\r\n\tif ( ! verifiedField ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tverifiedField.querySelector( 'input' ).checked = false;\r\n};\r\n\r\nexport { getVerifiedValue, resetVerified };\r\nexport default realpressVerified;\r\n","const { __ } = wp.i18n;\r\nconst yearBuiltFieldNode = document.querySelector( '.realpress-search-field.year' );\r\nconst realpressYearBuilt = () => {\r\n\tif ( ! yearBuiltFieldNode ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tconst fieldItemNodes = yearBuiltFieldNode.querySelectorAll( '.field-item' );\r\n\t[ ...fieldItemNodes ].map( ( fieldItemNode ) => {\r\n\t\tconst displayItemNode = fieldItemNode.querySelector( '.display-item' );\r\n\t\tconst inputNode = displayItemNode.querySelector( 'input[type=\"text\"]' );\r\n\t\tconst warningNode = displayItemNode.querySelector( 'span.warning' );\r\n\r\n\t\tinputNode.addEventListener( 'focus', function( event ) {\r\n\t\t\tfieldItemNode.classList.add( 'active' );\r\n\t\t} );\r\n\r\n\t\tdocument.addEventListener( 'click', function( event ) {\r\n\t\t\tif ( ! inputNode.contains( event.target ) ) {\r\n\t\t\t\tfieldItemNode.classList.remove( 'active' );\r\n\t\t\t}\r\n\t\t} );\r\n\r\n\t\tinputNode.addEventListener( 'change', function() {\r\n\t\t\tconst value = inputNode.value;\r\n\t\t\tif ( isNaN( value ) ) {\r\n\t\t\t\tinputNode.value = '';\r\n\t\t\t} else {\r\n\t\t\t\tinputNode.value = value;\r\n\t\t\t}\r\n\t\t\twarningNode.innerHTML = '';\r\n\t\t} );\r\n\r\n\t\tinputNode.addEventListener( 'keyup', function() {\r\n\t\t\tlet value = inputNode.value;\r\n\t\t\tif ( isNaN( value ) ) {\r\n\t\t\t\twarningNode.innerHTML = __( 'Invalid number', 'realpress' );\r\n\t\t\t} else {\r\n\t\t\t\twarningNode.innerHTML = '';\r\n\t\t\t\tif ( value ) {\r\n\t\t\t\t\tvalue = +value;\r\n\t\t\t\t}\r\n\t\t\t\tinputNode.value = value;\r\n\t\t\t}\r\n\t\t} );\r\n\t} );\r\n};\r\n\r\nconst getMinYearValue = () => {\r\n\tif ( ! yearBuiltFieldNode ) {\r\n\t\treturn '';\r\n\t}\r\n\r\n\tconst minYearNode = yearBuiltFieldNode.querySelector( 'input[name=\"min-year\"]' );\r\n\tif ( minYearNode && minYearNode.value ) {\r\n\t\treturn minYearNode.value;\r\n\t}\r\n\r\n\treturn '';\r\n};\r\n\r\nconst getMaxYearValue = () => {\r\n\tif ( ! yearBuiltFieldNode ) {\r\n\t\treturn '';\r\n\t}\r\n\r\n\tconst maxYearNode = yearBuiltFieldNode.querySelector( 'input[name=\"max-year\"]' );\r\n\tif ( maxYearNode && maxYearNode.value ) {\r\n\t\treturn maxYearNode.value;\r\n\t}\r\n\r\n\treturn '';\r\n};\r\n\r\nconst resetYearBuilt = () => {\r\n\tif ( ! yearBuiltFieldNode ) {\r\n\t\treturn '';\r\n\t}\r\n\r\n\tconst minYearNode = yearBuiltFieldNode.querySelector( 'input[name=\"min-year\"]' );\r\n\tconst maxYearNode = yearBuiltFieldNode.querySelector( 'input[name=\"max-year\"]' );\r\n\r\n\tminYearNode.value = '';\r\n\tmaxYearNode.value = '';\r\n};\r\n\r\nexport { getMinYearValue, getMaxYearValue, resetYearBuilt };\r\nexport default realpressYearBuilt;\r\n","const numberDecimals = REALPRESS_GLOBAL_OBJECT.number_decimals || 0;\r\nconst currencySymbol = REALPRESS_GLOBAL_OBJECT.currency_symbol || '';\r\nconst thousandsSeparator = REALPRESS_GLOBAL_OBJECT.thousands_separator || '';\r\nconst currencyPosition = REALPRESS_GLOBAL_OBJECT.currency_position || 'left';\r\nconst renderPrice = ( price ) => {\r\n\tprice = renderPriceNumber( price );\r\n\tswitch ( currencyPosition ) {\r\n\tcase 'left':\r\n\t\tprice = currencySymbol + price;\r\n\t\tbreak;\r\n\tcase 'right':\r\n\t\tprice = price + currencySymbol;\r\n\t\tbreak;\r\n\tcase 'left_space':\r\n\t\tprice = currencySymbol + ' ' + price;\r\n\t\tbreak;\r\n\tcase 'right_space':\r\n\t\tprice = price + ' ' + currencySymbol;\r\n\t\tbreak;\r\n\tdefault:\r\n\t\tbreak;\r\n\t}\r\n\r\n\treturn price;\r\n};\r\n\r\nconst renderPriceNumber = ( price ) => {\r\n\tprice = ( price / 1 ).toFixed( numberDecimals );\r\n\tprice = price.toString().replace( /\\B(?=(\\d{3})+(?!\\d))/g, thousandsSeparator );\r\n\r\n\treturn price;\r\n};\r\n\r\nexport { renderPrice, renderPriceNumber };\r\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.noUiSlider = {}));\n})(this, (function (exports) { 'use strict';\n\n exports.PipsMode = void 0;\n (function (PipsMode) {\n PipsMode[\"Range\"] = \"range\";\n PipsMode[\"Steps\"] = \"steps\";\n PipsMode[\"Positions\"] = \"positions\";\n PipsMode[\"Count\"] = \"count\";\n PipsMode[\"Values\"] = \"values\";\n })(exports.PipsMode || (exports.PipsMode = {}));\n exports.PipsType = void 0;\n (function (PipsType) {\n PipsType[PipsType[\"None\"] = -1] = \"None\";\n PipsType[PipsType[\"NoValue\"] = 0] = \"NoValue\";\n PipsType[PipsType[\"LargeValue\"] = 1] = \"LargeValue\";\n PipsType[PipsType[\"SmallValue\"] = 2] = \"SmallValue\";\n })(exports.PipsType || (exports.PipsType = {}));\n //region Helper Methods\n function isValidFormatter(entry) {\n return isValidPartialFormatter(entry) && typeof entry.from === \"function\";\n }\n function isValidPartialFormatter(entry) {\n // partial formatters only need a to function and not a from function\n return typeof entry === \"object\" && typeof entry.to === \"function\";\n }\n function removeElement(el) {\n el.parentElement.removeChild(el);\n }\n function isSet(value) {\n return value !== null && value !== undefined;\n }\n // Bindable version\n function preventDefault(e) {\n e.preventDefault();\n }\n // Removes duplicates from an array.\n function unique(array) {\n return array.filter(function (a) {\n return !this[a] ? (this[a] = true) : false;\n }, {});\n }\n // Round a value to the closest 'to'.\n function closest(value, to) {\n return Math.round(value / to) * to;\n }\n // Current position of an element relative to the document.\n function offset(elem, orientation) {\n var rect = elem.getBoundingClientRect();\n var doc = elem.ownerDocument;\n var docElem = doc.documentElement;\n var pageOffset = getPageOffset(doc);\n // getBoundingClientRect contains left scroll in Chrome on Android.\n // I haven't found a feature detection that proves this. Worst case\n // scenario on mis-match: the 'tap' feature on horizontal sliders breaks.\n if (/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)) {\n pageOffset.x = 0;\n }\n return orientation ? rect.top + pageOffset.y - docElem.clientTop : rect.left + pageOffset.x - docElem.clientLeft;\n }\n // Checks whether a value is numerical.\n function isNumeric(a) {\n return typeof a === \"number\" && !isNaN(a) && isFinite(a);\n }\n // Sets a class and removes it after [duration] ms.\n function addClassFor(element, className, duration) {\n if (duration > 0) {\n addClass(element, className);\n setTimeout(function () {\n removeClass(element, className);\n }, duration);\n }\n }\n // Limits a value to 0 - 100\n function limit(a) {\n return Math.max(Math.min(a, 100), 0);\n }\n // Wraps a variable as an array, if it isn't one yet.\n // Note that an input array is returned by reference!\n function asArray(a) {\n return Array.isArray(a) ? a : [a];\n }\n // Counts decimals\n function countDecimals(numStr) {\n numStr = String(numStr);\n var pieces = numStr.split(\".\");\n return pieces.length > 1 ? pieces[1].length : 0;\n }\n // http://youmightnotneedjquery.com/#add_class\n function addClass(el, className) {\n if (el.classList && !/\\s/.test(className)) {\n el.classList.add(className);\n }\n else {\n el.className += \" \" + className;\n }\n }\n // http://youmightnotneedjquery.com/#remove_class\n function removeClass(el, className) {\n if (el.classList && !/\\s/.test(className)) {\n el.classList.remove(className);\n }\n else {\n el.className = el.className.replace(new RegExp(\"(^|\\\\b)\" + className.split(\" \").join(\"|\") + \"(\\\\b|$)\", \"gi\"), \" \");\n }\n }\n // https://plainjs.com/javascript/attributes/adding-removing-and-testing-for-classes-9/\n function hasClass(el, className) {\n return el.classList ? el.classList.contains(className) : new RegExp(\"\\\\b\" + className + \"\\\\b\").test(el.className);\n }\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY#Notes\n function getPageOffset(doc) {\n var supportPageOffset = window.pageXOffset !== undefined;\n var isCSS1Compat = (doc.compatMode || \"\") === \"CSS1Compat\";\n var x = supportPageOffset\n ? window.pageXOffset\n : isCSS1Compat\n ? doc.documentElement.scrollLeft\n : doc.body.scrollLeft;\n var y = supportPageOffset\n ? window.pageYOffset\n : isCSS1Compat\n ? doc.documentElement.scrollTop\n : doc.body.scrollTop;\n return {\n x: x,\n y: y,\n };\n }\n // we provide a function to compute constants instead\n // of accessing window.* as soon as the module needs it\n // so that we do not compute anything if not needed\n function getActions() {\n // Determine the events to bind. IE11 implements pointerEvents without\n // a prefix, which breaks compatibility with the IE10 implementation.\n return window.navigator.pointerEnabled\n ? {\n start: \"pointerdown\",\n move: \"pointermove\",\n end: \"pointerup\",\n }\n : window.navigator.msPointerEnabled\n ? {\n start: \"MSPointerDown\",\n move: \"MSPointerMove\",\n end: \"MSPointerUp\",\n }\n : {\n start: \"mousedown touchstart\",\n move: \"mousemove touchmove\",\n end: \"mouseup touchend\",\n };\n }\n // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n // Issue #785\n function getSupportsPassive() {\n var supportsPassive = false;\n /* eslint-disable */\n try {\n var opts = Object.defineProperty({}, \"passive\", {\n get: function () {\n supportsPassive = true;\n },\n });\n // @ts-ignore\n window.addEventListener(\"test\", null, opts);\n }\n catch (e) { }\n /* eslint-enable */\n return supportsPassive;\n }\n function getSupportsTouchActionNone() {\n return window.CSS && CSS.supports && CSS.supports(\"touch-action\", \"none\");\n }\n //endregion\n //region Range Calculation\n // Determine the size of a sub-range in relation to a full range.\n function subRangeRatio(pa, pb) {\n return 100 / (pb - pa);\n }\n // (percentage) How many percent is this value of this range?\n function fromPercentage(range, value, startRange) {\n return (value * 100) / (range[startRange + 1] - range[startRange]);\n }\n // (percentage) Where is this value on this range?\n function toPercentage(range, value) {\n return fromPercentage(range, range[0] < 0 ? value + Math.abs(range[0]) : value - range[0], 0);\n }\n // (value) How much is this percentage on this range?\n function isPercentage(range, value) {\n return (value * (range[1] - range[0])) / 100 + range[0];\n }\n function getJ(value, arr) {\n var j = 1;\n while (value >= arr[j]) {\n j += 1;\n }\n return j;\n }\n // (percentage) Input a value, find where, on a scale of 0-100, it applies.\n function toStepping(xVal, xPct, value) {\n if (value >= xVal.slice(-1)[0]) {\n return 100;\n }\n var j = getJ(value, xVal);\n var va = xVal[j - 1];\n var vb = xVal[j];\n var pa = xPct[j - 1];\n var pb = xPct[j];\n return pa + toPercentage([va, vb], value) / subRangeRatio(pa, pb);\n }\n // (value) Input a percentage, find where it is on the specified range.\n function fromStepping(xVal, xPct, value) {\n // There is no range group that fits 100\n if (value >= 100) {\n return xVal.slice(-1)[0];\n }\n var j = getJ(value, xPct);\n var va = xVal[j - 1];\n var vb = xVal[j];\n var pa = xPct[j - 1];\n var pb = xPct[j];\n return isPercentage([va, vb], (value - pa) * subRangeRatio(pa, pb));\n }\n // (percentage) Get the step that applies at a certain value.\n function getStep(xPct, xSteps, snap, value) {\n if (value === 100) {\n return value;\n }\n var j = getJ(value, xPct);\n var a = xPct[j - 1];\n var b = xPct[j];\n // If 'snap' is set, steps are used as fixed points on the slider.\n if (snap) {\n // Find the closest position, a or b.\n if (value - a > (b - a) / 2) {\n return b;\n }\n return a;\n }\n if (!xSteps[j - 1]) {\n return value;\n }\n return xPct[j - 1] + closest(value - xPct[j - 1], xSteps[j - 1]);\n }\n //endregion\n //region Spectrum\n var Spectrum = /** @class */ (function () {\n function Spectrum(entry, snap, singleStep) {\n this.xPct = [];\n this.xVal = [];\n this.xSteps = [];\n this.xNumSteps = [];\n this.xHighestCompleteStep = [];\n this.xSteps = [singleStep || false];\n this.xNumSteps = [false];\n this.snap = snap;\n var index;\n var ordered = [];\n // Map the object keys to an array.\n Object.keys(entry).forEach(function (index) {\n ordered.push([asArray(entry[index]), index]);\n });\n // Sort all entries by value (numeric sort).\n ordered.sort(function (a, b) {\n return a[0][0] - b[0][0];\n });\n // Convert all entries to subranges.\n for (index = 0; index < ordered.length; index++) {\n this.handleEntryPoint(ordered[index][1], ordered[index][0]);\n }\n // Store the actual step values.\n // xSteps is sorted in the same order as xPct and xVal.\n this.xNumSteps = this.xSteps.slice(0);\n // Convert all numeric steps to the percentage of the subrange they represent.\n for (index = 0; index < this.xNumSteps.length; index++) {\n this.handleStepPoint(index, this.xNumSteps[index]);\n }\n }\n Spectrum.prototype.getDistance = function (value) {\n var distances = [];\n for (var index = 0; index < this.xNumSteps.length - 1; index++) {\n distances[index] = fromPercentage(this.xVal, value, index);\n }\n return distances;\n };\n // Calculate the percentual distance over the whole scale of ranges.\n // direction: 0 = backwards / 1 = forwards\n Spectrum.prototype.getAbsoluteDistance = function (value, distances, direction) {\n var xPct_index = 0;\n // Calculate range where to start calculation\n if (value < this.xPct[this.xPct.length - 1]) {\n while (value > this.xPct[xPct_index + 1]) {\n xPct_index++;\n }\n }\n else if (value === this.xPct[this.xPct.length - 1]) {\n xPct_index = this.xPct.length - 2;\n }\n // If looking backwards and the value is exactly at a range separator then look one range further\n if (!direction && value === this.xPct[xPct_index + 1]) {\n xPct_index++;\n }\n if (distances === null) {\n distances = [];\n }\n var start_factor;\n var rest_factor = 1;\n var rest_rel_distance = distances[xPct_index];\n var range_pct = 0;\n var rel_range_distance = 0;\n var abs_distance_counter = 0;\n var range_counter = 0;\n // Calculate what part of the start range the value is\n if (direction) {\n start_factor = (value - this.xPct[xPct_index]) / (this.xPct[xPct_index + 1] - this.xPct[xPct_index]);\n }\n else {\n start_factor = (this.xPct[xPct_index + 1] - value) / (this.xPct[xPct_index + 1] - this.xPct[xPct_index]);\n }\n // Do until the complete distance across ranges is calculated\n while (rest_rel_distance > 0) {\n // Calculate the percentage of total range\n range_pct = this.xPct[xPct_index + 1 + range_counter] - this.xPct[xPct_index + range_counter];\n // Detect if the margin, padding or limit is larger then the current range and calculate\n if (distances[xPct_index + range_counter] * rest_factor + 100 - start_factor * 100 > 100) {\n // If larger then take the percentual distance of the whole range\n rel_range_distance = range_pct * start_factor;\n // Rest factor of relative percentual distance still to be calculated\n rest_factor = (rest_rel_distance - 100 * start_factor) / distances[xPct_index + range_counter];\n // Set start factor to 1 as for next range it does not apply.\n start_factor = 1;\n }\n else {\n // If smaller or equal then take the percentual distance of the calculate percentual part of that range\n rel_range_distance = ((distances[xPct_index + range_counter] * range_pct) / 100) * rest_factor;\n // No rest left as the rest fits in current range\n rest_factor = 0;\n }\n if (direction) {\n abs_distance_counter = abs_distance_counter - rel_range_distance;\n // Limit range to first range when distance becomes outside of minimum range\n if (this.xPct.length + range_counter >= 1) {\n range_counter--;\n }\n }\n else {\n abs_distance_counter = abs_distance_counter + rel_range_distance;\n // Limit range to last range when distance becomes outside of maximum range\n if (this.xPct.length - range_counter >= 1) {\n range_counter++;\n }\n }\n // Rest of relative percentual distance still to be calculated\n rest_rel_distance = distances[xPct_index + range_counter] * rest_factor;\n }\n return value + abs_distance_counter;\n };\n Spectrum.prototype.toStepping = function (value) {\n value = toStepping(this.xVal, this.xPct, value);\n return value;\n };\n Spectrum.prototype.fromStepping = function (value) {\n return fromStepping(this.xVal, this.xPct, value);\n };\n Spectrum.prototype.getStep = function (value) {\n value = getStep(this.xPct, this.xSteps, this.snap, value);\n return value;\n };\n Spectrum.prototype.getDefaultStep = function (value, isDown, size) {\n var j = getJ(value, this.xPct);\n // When at the top or stepping down, look at the previous sub-range\n if (value === 100 || (isDown && value === this.xPct[j - 1])) {\n j = Math.max(j - 1, 1);\n }\n return (this.xVal[j] - this.xVal[j - 1]) / size;\n };\n Spectrum.prototype.getNearbySteps = function (value) {\n var j = getJ(value, this.xPct);\n return {\n stepBefore: {\n startValue: this.xVal[j - 2],\n step: this.xNumSteps[j - 2],\n highestStep: this.xHighestCompleteStep[j - 2],\n },\n thisStep: {\n startValue: this.xVal[j - 1],\n step: this.xNumSteps[j - 1],\n highestStep: this.xHighestCompleteStep[j - 1],\n },\n stepAfter: {\n startValue: this.xVal[j],\n step: this.xNumSteps[j],\n highestStep: this.xHighestCompleteStep[j],\n },\n };\n };\n Spectrum.prototype.countStepDecimals = function () {\n var stepDecimals = this.xNumSteps.map(countDecimals);\n return Math.max.apply(null, stepDecimals);\n };\n Spectrum.prototype.hasNoSize = function () {\n return this.xVal[0] === this.xVal[this.xVal.length - 1];\n };\n // Outside testing\n Spectrum.prototype.convert = function (value) {\n return this.getStep(this.toStepping(value));\n };\n Spectrum.prototype.handleEntryPoint = function (index, value) {\n var percentage;\n // Covert min/max syntax to 0 and 100.\n if (index === \"min\") {\n percentage = 0;\n }\n else if (index === \"max\") {\n percentage = 100;\n }\n else {\n percentage = parseFloat(index);\n }\n // Check for correct input.\n if (!isNumeric(percentage) || !isNumeric(value[0])) {\n throw new Error(\"noUiSlider: 'range' value isn't numeric.\");\n }\n // Store values.\n this.xPct.push(percentage);\n this.xVal.push(value[0]);\n var value1 = Number(value[1]);\n // NaN will evaluate to false too, but to keep\n // logging clear, set step explicitly. Make sure\n // not to override the 'step' setting with false.\n if (!percentage) {\n if (!isNaN(value1)) {\n this.xSteps[0] = value1;\n }\n }\n else {\n this.xSteps.push(isNaN(value1) ? false : value1);\n }\n this.xHighestCompleteStep.push(0);\n };\n Spectrum.prototype.handleStepPoint = function (i, n) {\n // Ignore 'false' stepping.\n if (!n) {\n return;\n }\n // Step over zero-length ranges (#948);\n if (this.xVal[i] === this.xVal[i + 1]) {\n this.xSteps[i] = this.xHighestCompleteStep[i] = this.xVal[i];\n return;\n }\n // Factor to range ratio\n this.xSteps[i] =\n fromPercentage([this.xVal[i], this.xVal[i + 1]], n, 0) / subRangeRatio(this.xPct[i], this.xPct[i + 1]);\n var totalSteps = (this.xVal[i + 1] - this.xVal[i]) / this.xNumSteps[i];\n var highestStep = Math.ceil(Number(totalSteps.toFixed(3)) - 1);\n var step = this.xVal[i] + this.xNumSteps[i] * highestStep;\n this.xHighestCompleteStep[i] = step;\n };\n return Spectrum;\n }());\n //endregion\n //region Options\n /*\tEvery input option is tested and parsed. This will prevent\n endless validation in internal methods. These tests are\n structured with an item for every option available. An\n option can be marked as required by setting the 'r' flag.\n The testing function is provided with three arguments:\n - The provided value for the option;\n - A reference to the options object;\n - The name for the option;\n\n The testing function returns false when an error is detected,\n or true when everything is OK. It can also modify the option\n object, to make sure all values can be correctly looped elsewhere. */\n //region Defaults\n var defaultFormatter = {\n to: function (value) {\n return value === undefined ? \"\" : value.toFixed(2);\n },\n from: Number,\n };\n var cssClasses = {\n target: \"target\",\n base: \"base\",\n origin: \"origin\",\n handle: \"handle\",\n handleLower: \"handle-lower\",\n handleUpper: \"handle-upper\",\n touchArea: \"touch-area\",\n horizontal: \"horizontal\",\n vertical: \"vertical\",\n background: \"background\",\n connect: \"connect\",\n connects: \"connects\",\n ltr: \"ltr\",\n rtl: \"rtl\",\n textDirectionLtr: \"txt-dir-ltr\",\n textDirectionRtl: \"txt-dir-rtl\",\n draggable: \"draggable\",\n drag: \"state-drag\",\n tap: \"state-tap\",\n active: \"active\",\n tooltip: \"tooltip\",\n pips: \"pips\",\n pipsHorizontal: \"pips-horizontal\",\n pipsVertical: \"pips-vertical\",\n marker: \"marker\",\n markerHorizontal: \"marker-horizontal\",\n markerVertical: \"marker-vertical\",\n markerNormal: \"marker-normal\",\n markerLarge: \"marker-large\",\n markerSub: \"marker-sub\",\n value: \"value\",\n valueHorizontal: \"value-horizontal\",\n valueVertical: \"value-vertical\",\n valueNormal: \"value-normal\",\n valueLarge: \"value-large\",\n valueSub: \"value-sub\",\n };\n // Namespaces of internal event listeners\n var INTERNAL_EVENT_NS = {\n tooltips: \".__tooltips\",\n aria: \".__aria\",\n };\n //endregion\n function testStep(parsed, entry) {\n if (!isNumeric(entry)) {\n throw new Error(\"noUiSlider: 'step' is not numeric.\");\n }\n // The step option can still be used to set stepping\n // for linear sliders. Overwritten if set in 'range'.\n parsed.singleStep = entry;\n }\n function testKeyboardPageMultiplier(parsed, entry) {\n if (!isNumeric(entry)) {\n throw new Error(\"noUiSlider: 'keyboardPageMultiplier' is not numeric.\");\n }\n parsed.keyboardPageMultiplier = entry;\n }\n function testKeyboardMultiplier(parsed, entry) {\n if (!isNumeric(entry)) {\n throw new Error(\"noUiSlider: 'keyboardMultiplier' is not numeric.\");\n }\n parsed.keyboardMultiplier = entry;\n }\n function testKeyboardDefaultStep(parsed, entry) {\n if (!isNumeric(entry)) {\n throw new Error(\"noUiSlider: 'keyboardDefaultStep' is not numeric.\");\n }\n parsed.keyboardDefaultStep = entry;\n }\n function testRange(parsed, entry) {\n // Filter incorrect input.\n if (typeof entry !== \"object\" || Array.isArray(entry)) {\n throw new Error(\"noUiSlider: 'range' is not an object.\");\n }\n // Catch missing start or end.\n if (entry.min === undefined || entry.max === undefined) {\n throw new Error(\"noUiSlider: Missing 'min' or 'max' in 'range'.\");\n }\n parsed.spectrum = new Spectrum(entry, parsed.snap || false, parsed.singleStep);\n }\n function testStart(parsed, entry) {\n entry = asArray(entry);\n // Validate input. Values aren't tested, as the public .val method\n // will always provide a valid location.\n if (!Array.isArray(entry) || !entry.length) {\n throw new Error(\"noUiSlider: 'start' option is incorrect.\");\n }\n // Store the number of handles.\n parsed.handles = entry.length;\n // When the slider is initialized, the .val method will\n // be called with the start options.\n parsed.start = entry;\n }\n function testSnap(parsed, entry) {\n if (typeof entry !== \"boolean\") {\n throw new Error(\"noUiSlider: 'snap' option must be a boolean.\");\n }\n // Enforce 100% stepping within subranges.\n parsed.snap = entry;\n }\n function testAnimate(parsed, entry) {\n if (typeof entry !== \"boolean\") {\n throw new Error(\"noUiSlider: 'animate' option must be a boolean.\");\n }\n // Enforce 100% stepping within subranges.\n parsed.animate = entry;\n }\n function testAnimationDuration(parsed, entry) {\n if (typeof entry !== \"number\") {\n throw new Error(\"noUiSlider: 'animationDuration' option must be a number.\");\n }\n parsed.animationDuration = entry;\n }\n function testConnect(parsed, entry) {\n var connect = [false];\n var i;\n // Map legacy options\n if (entry === \"lower\") {\n entry = [true, false];\n }\n else if (entry === \"upper\") {\n entry = [false, true];\n }\n // Handle boolean options\n if (entry === true || entry === false) {\n for (i = 1; i < parsed.handles; i++) {\n connect.push(entry);\n }\n connect.push(false);\n }\n // Reject invalid input\n else if (!Array.isArray(entry) || !entry.length || entry.length !== parsed.handles + 1) {\n throw new Error(\"noUiSlider: 'connect' option doesn't match handle count.\");\n }\n else {\n connect = entry;\n }\n parsed.connect = connect;\n }\n function testOrientation(parsed, entry) {\n // Set orientation to an a numerical value for easy\n // array selection.\n switch (entry) {\n case \"horizontal\":\n parsed.ort = 0;\n break;\n case \"vertical\":\n parsed.ort = 1;\n break;\n default:\n throw new Error(\"noUiSlider: 'orientation' option is invalid.\");\n }\n }\n function testMargin(parsed, entry) {\n if (!isNumeric(entry)) {\n throw new Error(\"noUiSlider: 'margin' option must be numeric.\");\n }\n // Issue #582\n if (entry === 0) {\n return;\n }\n parsed.margin = parsed.spectrum.getDistance(entry);\n }\n function testLimit(parsed, entry) {\n if (!isNumeric(entry)) {\n throw new Error(\"noUiSlider: 'limit' option must be numeric.\");\n }\n parsed.limit = parsed.spectrum.getDistance(entry);\n if (!parsed.limit || parsed.handles < 2) {\n throw new Error(\"noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.\");\n }\n }\n function testPadding(parsed, entry) {\n var index;\n if (!isNumeric(entry) && !Array.isArray(entry)) {\n throw new Error(\"noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.\");\n }\n if (Array.isArray(entry) && !(entry.length === 2 || isNumeric(entry[0]) || isNumeric(entry[1]))) {\n throw new Error(\"noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.\");\n }\n if (entry === 0) {\n return;\n }\n if (!Array.isArray(entry)) {\n entry = [entry, entry];\n }\n // 'getDistance' returns false for invalid values.\n parsed.padding = [parsed.spectrum.getDistance(entry[0]), parsed.spectrum.getDistance(entry[1])];\n for (index = 0; index < parsed.spectrum.xNumSteps.length - 1; index++) {\n // last \"range\" can't contain step size as it is purely an endpoint.\n if (parsed.padding[0][index] < 0 || parsed.padding[1][index] < 0) {\n throw new Error(\"noUiSlider: 'padding' option must be a positive number(s).\");\n }\n }\n var totalPadding = entry[0] + entry[1];\n var firstValue = parsed.spectrum.xVal[0];\n var lastValue = parsed.spectrum.xVal[parsed.spectrum.xVal.length - 1];\n if (totalPadding / (lastValue - firstValue) > 1) {\n throw new Error(\"noUiSlider: 'padding' option must not exceed 100% of the range.\");\n }\n }\n function testDirection(parsed, entry) {\n // Set direction as a numerical value for easy parsing.\n // Invert connection for RTL sliders, so that the proper\n // handles get the connect/background classes.\n switch (entry) {\n case \"ltr\":\n parsed.dir = 0;\n break;\n case \"rtl\":\n parsed.dir = 1;\n break;\n default:\n throw new Error(\"noUiSlider: 'direction' option was not recognized.\");\n }\n }\n function testBehaviour(parsed, entry) {\n // Make sure the input is a string.\n if (typeof entry !== \"string\") {\n throw new Error(\"noUiSlider: 'behaviour' must be a string containing options.\");\n }\n // Check if the string contains any keywords.\n // None are required.\n var tap = entry.indexOf(\"tap\") >= 0;\n var drag = entry.indexOf(\"drag\") >= 0;\n var fixed = entry.indexOf(\"fixed\") >= 0;\n var snap = entry.indexOf(\"snap\") >= 0;\n var hover = entry.indexOf(\"hover\") >= 0;\n var unconstrained = entry.indexOf(\"unconstrained\") >= 0;\n var dragAll = entry.indexOf(\"drag-all\") >= 0;\n var smoothSteps = entry.indexOf(\"smooth-steps\") >= 0;\n if (fixed) {\n if (parsed.handles !== 2) {\n throw new Error(\"noUiSlider: 'fixed' behaviour must be used with 2 handles\");\n }\n // Use margin to enforce fixed state\n testMargin(parsed, parsed.start[1] - parsed.start[0]);\n }\n if (unconstrained && (parsed.margin || parsed.limit)) {\n throw new Error(\"noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit\");\n }\n parsed.events = {\n tap: tap || snap,\n drag: drag,\n dragAll: dragAll,\n smoothSteps: smoothSteps,\n fixed: fixed,\n snap: snap,\n hover: hover,\n unconstrained: unconstrained,\n };\n }\n function testTooltips(parsed, entry) {\n if (entry === false) {\n return;\n }\n if (entry === true || isValidPartialFormatter(entry)) {\n parsed.tooltips = [];\n for (var i = 0; i < parsed.handles; i++) {\n parsed.tooltips.push(entry);\n }\n }\n else {\n entry = asArray(entry);\n if (entry.length !== parsed.handles) {\n throw new Error(\"noUiSlider: must pass a formatter for all handles.\");\n }\n entry.forEach(function (formatter) {\n if (typeof formatter !== \"boolean\" && !isValidPartialFormatter(formatter)) {\n throw new Error(\"noUiSlider: 'tooltips' must be passed a formatter or 'false'.\");\n }\n });\n parsed.tooltips = entry;\n }\n }\n function testHandleAttributes(parsed, entry) {\n if (entry.length !== parsed.handles) {\n throw new Error(\"noUiSlider: must pass a attributes for all handles.\");\n }\n parsed.handleAttributes = entry;\n }\n function testAriaFormat(parsed, entry) {\n if (!isValidPartialFormatter(entry)) {\n throw new Error(\"noUiSlider: 'ariaFormat' requires 'to' method.\");\n }\n parsed.ariaFormat = entry;\n }\n function testFormat(parsed, entry) {\n if (!isValidFormatter(entry)) {\n throw new Error(\"noUiSlider: 'format' requires 'to' and 'from' methods.\");\n }\n parsed.format = entry;\n }\n function testKeyboardSupport(parsed, entry) {\n if (typeof entry !== \"boolean\") {\n throw new Error(\"noUiSlider: 'keyboardSupport' option must be a boolean.\");\n }\n parsed.keyboardSupport = entry;\n }\n function testDocumentElement(parsed, entry) {\n // This is an advanced option. Passed values are used without validation.\n parsed.documentElement = entry;\n }\n function testCssPrefix(parsed, entry) {\n if (typeof entry !== \"string\" && entry !== false) {\n throw new Error(\"noUiSlider: 'cssPrefix' must be a string or `false`.\");\n }\n parsed.cssPrefix = entry;\n }\n function testCssClasses(parsed, entry) {\n if (typeof entry !== \"object\") {\n throw new Error(\"noUiSlider: 'cssClasses' must be an object.\");\n }\n if (typeof parsed.cssPrefix === \"string\") {\n parsed.cssClasses = {};\n Object.keys(entry).forEach(function (key) {\n parsed.cssClasses[key] = parsed.cssPrefix + entry[key];\n });\n }\n else {\n parsed.cssClasses = entry;\n }\n }\n // Test all developer settings and parse to assumption-safe values.\n function testOptions(options) {\n // To prove a fix for #537, freeze options here.\n // If the object is modified, an error will be thrown.\n // Object.freeze(options);\n var parsed = {\n margin: null,\n limit: null,\n padding: null,\n animate: true,\n animationDuration: 300,\n ariaFormat: defaultFormatter,\n format: defaultFormatter,\n };\n // Tests are executed in the order they are presented here.\n var tests = {\n step: { r: false, t: testStep },\n keyboardPageMultiplier: { r: false, t: testKeyboardPageMultiplier },\n keyboardMultiplier: { r: false, t: testKeyboardMultiplier },\n keyboardDefaultStep: { r: false, t: testKeyboardDefaultStep },\n start: { r: true, t: testStart },\n connect: { r: true, t: testConnect },\n direction: { r: true, t: testDirection },\n snap: { r: false, t: testSnap },\n animate: { r: false, t: testAnimate },\n animationDuration: { r: false, t: testAnimationDuration },\n range: { r: true, t: testRange },\n orientation: { r: false, t: testOrientation },\n margin: { r: false, t: testMargin },\n limit: { r: false, t: testLimit },\n padding: { r: false, t: testPadding },\n behaviour: { r: true, t: testBehaviour },\n ariaFormat: { r: false, t: testAriaFormat },\n format: { r: false, t: testFormat },\n tooltips: { r: false, t: testTooltips },\n keyboardSupport: { r: true, t: testKeyboardSupport },\n documentElement: { r: false, t: testDocumentElement },\n cssPrefix: { r: true, t: testCssPrefix },\n cssClasses: { r: true, t: testCssClasses },\n handleAttributes: { r: false, t: testHandleAttributes },\n };\n var defaults = {\n connect: false,\n direction: \"ltr\",\n behaviour: \"tap\",\n orientation: \"horizontal\",\n keyboardSupport: true,\n cssPrefix: \"noUi-\",\n cssClasses: cssClasses,\n keyboardPageMultiplier: 5,\n keyboardMultiplier: 1,\n keyboardDefaultStep: 10,\n };\n // AriaFormat defaults to regular format, if any.\n if (options.format && !options.ariaFormat) {\n options.ariaFormat = options.format;\n }\n // Run all options through a testing mechanism to ensure correct\n // input. It should be noted that options might get modified to\n // be handled properly. E.g. wrapping integers in arrays.\n Object.keys(tests).forEach(function (name) {\n // If the option isn't set, but it is required, throw an error.\n if (!isSet(options[name]) && defaults[name] === undefined) {\n if (tests[name].r) {\n throw new Error(\"noUiSlider: '\" + name + \"' is required.\");\n }\n return;\n }\n tests[name].t(parsed, !isSet(options[name]) ? defaults[name] : options[name]);\n });\n // Forward pips options\n parsed.pips = options.pips;\n // All recent browsers accept unprefixed transform.\n // We need -ms- for IE9 and -webkit- for older Android;\n // Assume use of -webkit- if unprefixed and -ms- are not supported.\n // https://caniuse.com/#feat=transforms2d\n var d = document.createElement(\"div\");\n var msPrefix = d.style.msTransform !== undefined;\n var noPrefix = d.style.transform !== undefined;\n parsed.transformRule = noPrefix ? \"transform\" : msPrefix ? \"msTransform\" : \"webkitTransform\";\n // Pips don't move, so we can place them using left/top.\n var styles = [\n [\"left\", \"top\"],\n [\"right\", \"bottom\"],\n ];\n parsed.style = styles[parsed.dir][parsed.ort];\n return parsed;\n }\n //endregion\n function scope(target, options, originalOptions) {\n var actions = getActions();\n var supportsTouchActionNone = getSupportsTouchActionNone();\n var supportsPassive = supportsTouchActionNone && getSupportsPassive();\n // All variables local to 'scope' are prefixed with 'scope_'\n // Slider DOM Nodes\n var scope_Target = target;\n var scope_Base;\n var scope_Handles;\n var scope_Connects;\n var scope_Pips;\n var scope_Tooltips;\n // Slider state values\n var scope_Spectrum = options.spectrum;\n var scope_Values = [];\n var scope_Locations = [];\n var scope_HandleNumbers = [];\n var scope_ActiveHandlesCount = 0;\n var scope_Events = {};\n // Document Nodes\n var scope_Document = target.ownerDocument;\n var scope_DocumentElement = options.documentElement || scope_Document.documentElement;\n var scope_Body = scope_Document.body;\n // For horizontal sliders in standard ltr documents,\n // make .noUi-origin overflow to the left so the document doesn't scroll.\n var scope_DirOffset = scope_Document.dir === \"rtl\" || options.ort === 1 ? 0 : 100;\n // Creates a node, adds it to target, returns the new node.\n function addNodeTo(addTarget, className) {\n var div = scope_Document.createElement(\"div\");\n if (className) {\n addClass(div, className);\n }\n addTarget.appendChild(div);\n return div;\n }\n // Append a origin to the base\n function addOrigin(base, handleNumber) {\n var origin = addNodeTo(base, options.cssClasses.origin);\n var handle = addNodeTo(origin, options.cssClasses.handle);\n addNodeTo(handle, options.cssClasses.touchArea);\n handle.setAttribute(\"data-handle\", String(handleNumber));\n if (options.keyboardSupport) {\n // https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex\n // 0 = focusable and reachable\n handle.setAttribute(\"tabindex\", \"0\");\n handle.addEventListener(\"keydown\", function (event) {\n return eventKeydown(event, handleNumber);\n });\n }\n if (options.handleAttributes !== undefined) {\n var attributes_1 = options.handleAttributes[handleNumber];\n Object.keys(attributes_1).forEach(function (attribute) {\n handle.setAttribute(attribute, attributes_1[attribute]);\n });\n }\n handle.setAttribute(\"role\", \"slider\");\n handle.setAttribute(\"aria-orientation\", options.ort ? \"vertical\" : \"horizontal\");\n if (handleNumber === 0) {\n addClass(handle, options.cssClasses.handleLower);\n }\n else if (handleNumber === options.handles - 1) {\n addClass(handle, options.cssClasses.handleUpper);\n }\n return origin;\n }\n // Insert nodes for connect elements\n function addConnect(base, add) {\n if (!add) {\n return false;\n }\n return addNodeTo(base, options.cssClasses.connect);\n }\n // Add handles to the slider base.\n function addElements(connectOptions, base) {\n var connectBase = addNodeTo(base, options.cssClasses.connects);\n scope_Handles = [];\n scope_Connects = [];\n scope_Connects.push(addConnect(connectBase, connectOptions[0]));\n // [::::O====O====O====]\n // connectOptions = [0, 1, 1, 1]\n for (var i = 0; i < options.handles; i++) {\n // Keep a list of all added handles.\n scope_Handles.push(addOrigin(base, i));\n scope_HandleNumbers[i] = i;\n scope_Connects.push(addConnect(connectBase, connectOptions[i + 1]));\n }\n }\n // Initialize a single slider.\n function addSlider(addTarget) {\n // Apply classes and data to the target.\n addClass(addTarget, options.cssClasses.target);\n if (options.dir === 0) {\n addClass(addTarget, options.cssClasses.ltr);\n }\n else {\n addClass(addTarget, options.cssClasses.rtl);\n }\n if (options.ort === 0) {\n addClass(addTarget, options.cssClasses.horizontal);\n }\n else {\n addClass(addTarget, options.cssClasses.vertical);\n }\n var textDirection = getComputedStyle(addTarget).direction;\n if (textDirection === \"rtl\") {\n addClass(addTarget, options.cssClasses.textDirectionRtl);\n }\n else {\n addClass(addTarget, options.cssClasses.textDirectionLtr);\n }\n return addNodeTo(addTarget, options.cssClasses.base);\n }\n function addTooltip(handle, handleNumber) {\n if (!options.tooltips || !options.tooltips[handleNumber]) {\n return false;\n }\n return addNodeTo(handle.firstChild, options.cssClasses.tooltip);\n }\n function isSliderDisabled() {\n return scope_Target.hasAttribute(\"disabled\");\n }\n // Disable the slider dragging if any handle is disabled\n function isHandleDisabled(handleNumber) {\n var handleOrigin = scope_Handles[handleNumber];\n return handleOrigin.hasAttribute(\"disabled\");\n }\n function removeTooltips() {\n if (scope_Tooltips) {\n removeEvent(\"update\" + INTERNAL_EVENT_NS.tooltips);\n scope_Tooltips.forEach(function (tooltip) {\n if (tooltip) {\n removeElement(tooltip);\n }\n });\n scope_Tooltips = null;\n }\n }\n // The tooltips option is a shorthand for using the 'update' event.\n function tooltips() {\n removeTooltips();\n // Tooltips are added with options.tooltips in original order.\n scope_Tooltips = scope_Handles.map(addTooltip);\n bindEvent(\"update\" + INTERNAL_EVENT_NS.tooltips, function (values, handleNumber, unencoded) {\n if (!scope_Tooltips || !options.tooltips) {\n return;\n }\n if (scope_Tooltips[handleNumber] === false) {\n return;\n }\n var formattedValue = values[handleNumber];\n if (options.tooltips[handleNumber] !== true) {\n formattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n }\n scope_Tooltips[handleNumber].innerHTML = formattedValue;\n });\n }\n function aria() {\n removeEvent(\"update\" + INTERNAL_EVENT_NS.aria);\n bindEvent(\"update\" + INTERNAL_EVENT_NS.aria, function (values, handleNumber, unencoded, tap, positions) {\n // Update Aria Values for all handles, as a change in one changes min and max values for the next.\n scope_HandleNumbers.forEach(function (index) {\n var handle = scope_Handles[index];\n var min = checkHandlePosition(scope_Locations, index, 0, true, true, true);\n var max = checkHandlePosition(scope_Locations, index, 100, true, true, true);\n var now = positions[index];\n // Formatted value for display\n var text = String(options.ariaFormat.to(unencoded[index]));\n // Map to slider range values\n min = scope_Spectrum.fromStepping(min).toFixed(1);\n max = scope_Spectrum.fromStepping(max).toFixed(1);\n now = scope_Spectrum.fromStepping(now).toFixed(1);\n handle.children[0].setAttribute(\"aria-valuemin\", min);\n handle.children[0].setAttribute(\"aria-valuemax\", max);\n handle.children[0].setAttribute(\"aria-valuenow\", now);\n handle.children[0].setAttribute(\"aria-valuetext\", text);\n });\n });\n }\n function getGroup(pips) {\n // Use the range.\n if (pips.mode === exports.PipsMode.Range || pips.mode === exports.PipsMode.Steps) {\n return scope_Spectrum.xVal;\n }\n if (pips.mode === exports.PipsMode.Count) {\n if (pips.values < 2) {\n throw new Error(\"noUiSlider: 'values' (>= 2) required for mode 'count'.\");\n }\n // Divide 0 - 100 in 'count' parts.\n var interval = pips.values - 1;\n var spread = 100 / interval;\n var values = [];\n // List these parts and have them handled as 'positions'.\n while (interval--) {\n values[interval] = interval * spread;\n }\n values.push(100);\n return mapToRange(values, pips.stepped);\n }\n if (pips.mode === exports.PipsMode.Positions) {\n // Map all percentages to on-range values.\n return mapToRange(pips.values, pips.stepped);\n }\n if (pips.mode === exports.PipsMode.Values) {\n // If the value must be stepped, it needs to be converted to a percentage first.\n if (pips.stepped) {\n return pips.values.map(function (value) {\n // Convert to percentage, apply step, return to value.\n return scope_Spectrum.fromStepping(scope_Spectrum.getStep(scope_Spectrum.toStepping(value)));\n });\n }\n // Otherwise, we can simply use the values.\n return pips.values;\n }\n return []; // pips.mode = never\n }\n function mapToRange(values, stepped) {\n return values.map(function (value) {\n return scope_Spectrum.fromStepping(stepped ? scope_Spectrum.getStep(value) : value);\n });\n }\n function generateSpread(pips) {\n function safeIncrement(value, increment) {\n // Avoid floating point variance by dropping the smallest decimal places.\n return Number((value + increment).toFixed(7));\n }\n var group = getGroup(pips);\n var indexes = {};\n var firstInRange = scope_Spectrum.xVal[0];\n var lastInRange = scope_Spectrum.xVal[scope_Spectrum.xVal.length - 1];\n var ignoreFirst = false;\n var ignoreLast = false;\n var prevPct = 0;\n // Create a copy of the group, sort it and filter away all duplicates.\n group = unique(group.slice().sort(function (a, b) {\n return a - b;\n }));\n // Make sure the range starts with the first element.\n if (group[0] !== firstInRange) {\n group.unshift(firstInRange);\n ignoreFirst = true;\n }\n // Likewise for the last one.\n if (group[group.length - 1] !== lastInRange) {\n group.push(lastInRange);\n ignoreLast = true;\n }\n group.forEach(function (current, index) {\n // Get the current step and the lower + upper positions.\n var step;\n var i;\n var q;\n var low = current;\n var high = group[index + 1];\n var newPct;\n var pctDifference;\n var pctPos;\n var type;\n var steps;\n var realSteps;\n var stepSize;\n var isSteps = pips.mode === exports.PipsMode.Steps;\n // When using 'steps' mode, use the provided steps.\n // Otherwise, we'll step on to the next subrange.\n if (isSteps) {\n step = scope_Spectrum.xNumSteps[index];\n }\n // Default to a 'full' step.\n if (!step) {\n step = high - low;\n }\n // If high is undefined we are at the last subrange. Make sure it iterates once (#1088)\n if (high === undefined) {\n high = low;\n }\n // Make sure step isn't 0, which would cause an infinite loop (#654)\n step = Math.max(step, 0.0000001);\n // Find all steps in the subrange.\n for (i = low; i <= high; i = safeIncrement(i, step)) {\n // Get the percentage value for the current step,\n // calculate the size for the subrange.\n newPct = scope_Spectrum.toStepping(i);\n pctDifference = newPct - prevPct;\n steps = pctDifference / (pips.density || 1);\n realSteps = Math.round(steps);\n // This ratio represents the amount of percentage-space a point indicates.\n // For a density 1 the points/percentage = 1. For density 2, that percentage needs to be re-divided.\n // Round the percentage offset to an even number, then divide by two\n // to spread the offset on both sides of the range.\n stepSize = pctDifference / realSteps;\n // Divide all points evenly, adding the correct number to this subrange.\n // Run up to <= so that 100% gets a point, event if ignoreLast is set.\n for (q = 1; q <= realSteps; q += 1) {\n // The ratio between the rounded value and the actual size might be ~1% off.\n // Correct the percentage offset by the number of points\n // per subrange. density = 1 will result in 100 points on the\n // full range, 2 for 50, 4 for 25, etc.\n pctPos = prevPct + q * stepSize;\n indexes[pctPos.toFixed(5)] = [scope_Spectrum.fromStepping(pctPos), 0];\n }\n // Determine the point type.\n type = group.indexOf(i) > -1 ? exports.PipsType.LargeValue : isSteps ? exports.PipsType.SmallValue : exports.PipsType.NoValue;\n // Enforce the 'ignoreFirst' option by overwriting the type for 0.\n if (!index && ignoreFirst && i !== high) {\n type = 0;\n }\n if (!(i === high && ignoreLast)) {\n // Mark the 'type' of this point. 0 = plain, 1 = real value, 2 = step value.\n indexes[newPct.toFixed(5)] = [i, type];\n }\n // Update the percentage count.\n prevPct = newPct;\n }\n });\n return indexes;\n }\n function addMarking(spread, filterFunc, formatter) {\n var _a, _b;\n var element = scope_Document.createElement(\"div\");\n var valueSizeClasses = (_a = {},\n _a[exports.PipsType.None] = \"\",\n _a[exports.PipsType.NoValue] = options.cssClasses.valueNormal,\n _a[exports.PipsType.LargeValue] = options.cssClasses.valueLarge,\n _a[exports.PipsType.SmallValue] = options.cssClasses.valueSub,\n _a);\n var markerSizeClasses = (_b = {},\n _b[exports.PipsType.None] = \"\",\n _b[exports.PipsType.NoValue] = options.cssClasses.markerNormal,\n _b[exports.PipsType.LargeValue] = options.cssClasses.markerLarge,\n _b[exports.PipsType.SmallValue] = options.cssClasses.markerSub,\n _b);\n var valueOrientationClasses = [options.cssClasses.valueHorizontal, options.cssClasses.valueVertical];\n var markerOrientationClasses = [options.cssClasses.markerHorizontal, options.cssClasses.markerVertical];\n addClass(element, options.cssClasses.pips);\n addClass(element, options.ort === 0 ? options.cssClasses.pipsHorizontal : options.cssClasses.pipsVertical);\n function getClasses(type, source) {\n var a = source === options.cssClasses.value;\n var orientationClasses = a ? valueOrientationClasses : markerOrientationClasses;\n var sizeClasses = a ? valueSizeClasses : markerSizeClasses;\n return source + \" \" + orientationClasses[options.ort] + \" \" + sizeClasses[type];\n }\n function addSpread(offset, value, type) {\n // Apply the filter function, if it is set.\n type = filterFunc ? filterFunc(value, type) : type;\n if (type === exports.PipsType.None) {\n return;\n }\n // Add a marker for every point\n var node = addNodeTo(element, false);\n node.className = getClasses(type, options.cssClasses.marker);\n node.style[options.style] = offset + \"%\";\n // Values are only appended for points marked '1' or '2'.\n if (type > exports.PipsType.NoValue) {\n node = addNodeTo(element, false);\n node.className = getClasses(type, options.cssClasses.value);\n node.setAttribute(\"data-value\", String(value));\n node.style[options.style] = offset + \"%\";\n node.innerHTML = String(formatter.to(value));\n }\n }\n // Append all points.\n Object.keys(spread).forEach(function (offset) {\n addSpread(offset, spread[offset][0], spread[offset][1]);\n });\n return element;\n }\n function removePips() {\n if (scope_Pips) {\n removeElement(scope_Pips);\n scope_Pips = null;\n }\n }\n function pips(pips) {\n // Fix #669\n removePips();\n var spread = generateSpread(pips);\n var filter = pips.filter;\n var format = pips.format || {\n to: function (value) {\n return String(Math.round(value));\n },\n };\n scope_Pips = scope_Target.appendChild(addMarking(spread, filter, format));\n return scope_Pips;\n }\n // Shorthand for base dimensions.\n function baseSize() {\n var rect = scope_Base.getBoundingClientRect();\n var alt = (\"offset\" + [\"Width\", \"Height\"][options.ort]);\n return options.ort === 0 ? rect.width || scope_Base[alt] : rect.height || scope_Base[alt];\n }\n // Handler for attaching events trough a proxy.\n function attachEvent(events, element, callback, data) {\n // This function can be used to 'filter' events to the slider.\n // element is a node, not a nodeList\n var method = function (event) {\n var e = fixEvent(event, data.pageOffset, data.target || element);\n // fixEvent returns false if this event has a different target\n // when handling (multi-) touch events;\n if (!e) {\n return false;\n }\n // doNotReject is passed by all end events to make sure released touches\n // are not rejected, leaving the slider \"stuck\" to the cursor;\n if (isSliderDisabled() && !data.doNotReject) {\n return false;\n }\n // Stop if an active 'tap' transition is taking place.\n if (hasClass(scope_Target, options.cssClasses.tap) && !data.doNotReject) {\n return false;\n }\n // Ignore right or middle clicks on start #454\n if (events === actions.start && e.buttons !== undefined && e.buttons > 1) {\n return false;\n }\n // Ignore right or middle clicks on start #454\n if (data.hover && e.buttons) {\n return false;\n }\n // 'supportsPassive' is only true if a browser also supports touch-action: none in CSS.\n // iOS safari does not, so it doesn't get to benefit from passive scrolling. iOS does support\n // touch-action: manipulation, but that allows panning, which breaks\n // sliders after zooming/on non-responsive pages.\n // See: https://bugs.webkit.org/show_bug.cgi?id=133112\n if (!supportsPassive) {\n e.preventDefault();\n }\n e.calcPoint = e.points[options.ort];\n // Call the event handler with the event [ and additional data ].\n callback(e, data);\n return;\n };\n var methods = [];\n // Bind a closure on the target for every event type.\n events.split(\" \").forEach(function (eventName) {\n element.addEventListener(eventName, method, supportsPassive ? { passive: true } : false);\n methods.push([eventName, method]);\n });\n return methods;\n }\n // Provide a clean event with standardized offset values.\n function fixEvent(e, pageOffset, eventTarget) {\n // Filter the event to register the type, which can be\n // touch, mouse or pointer. Offset changes need to be\n // made on an event specific basis.\n var touch = e.type.indexOf(\"touch\") === 0;\n var mouse = e.type.indexOf(\"mouse\") === 0;\n var pointer = e.type.indexOf(\"pointer\") === 0;\n var x = 0;\n var y = 0;\n // IE10 implemented pointer events with a prefix;\n if (e.type.indexOf(\"MSPointer\") === 0) {\n pointer = true;\n }\n // Erroneous events seem to be passed in occasionally on iOS/iPadOS after user finishes interacting with\n // the slider. They appear to be of type MouseEvent, yet they don't have usual properties set. Ignore\n // events that have no touches or buttons associated with them. (#1057, #1079, #1095)\n if (e.type === \"mousedown\" && !e.buttons && !e.touches) {\n return false;\n }\n // The only thing one handle should be concerned about is the touches that originated on top of it.\n if (touch) {\n // Returns true if a touch originated on the target.\n var isTouchOnTarget = function (checkTouch) {\n var target = checkTouch.target;\n return (target === eventTarget ||\n eventTarget.contains(target) ||\n (e.composed && e.composedPath().shift() === eventTarget));\n };\n // In the case of touchstart events, we need to make sure there is still no more than one\n // touch on the target so we look amongst all touches.\n if (e.type === \"touchstart\") {\n var targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\n // Do not support more than one touch per handle.\n if (targetTouches.length > 1) {\n return false;\n }\n x = targetTouches[0].pageX;\n y = targetTouches[0].pageY;\n }\n else {\n // In the other cases, find on changedTouches is enough.\n var targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n // Cancel if the target touch has not moved.\n if (!targetTouch) {\n return false;\n }\n x = targetTouch.pageX;\n y = targetTouch.pageY;\n }\n }\n pageOffset = pageOffset || getPageOffset(scope_Document);\n if (mouse || pointer) {\n x = e.clientX + pageOffset.x;\n y = e.clientY + pageOffset.y;\n }\n e.pageOffset = pageOffset;\n e.points = [x, y];\n e.cursor = mouse || pointer; // Fix #435\n return e;\n }\n // Translate a coordinate in the document to a percentage on the slider\n function calcPointToPercentage(calcPoint) {\n var location = calcPoint - offset(scope_Base, options.ort);\n var proposal = (location * 100) / baseSize();\n // Clamp proposal between 0% and 100%\n // Out-of-bound coordinates may occur when .noUi-base pseudo-elements\n // are used (e.g. contained handles feature)\n proposal = limit(proposal);\n return options.dir ? 100 - proposal : proposal;\n }\n // Find handle closest to a certain percentage on the slider\n function getClosestHandle(clickedPosition) {\n var smallestDifference = 100;\n var handleNumber = false;\n scope_Handles.forEach(function (handle, index) {\n // Disabled handles are ignored\n if (isHandleDisabled(index)) {\n return;\n }\n var handlePosition = scope_Locations[index];\n var differenceWithThisHandle = Math.abs(handlePosition - clickedPosition);\n // Initial state\n var clickAtEdge = differenceWithThisHandle === 100 && smallestDifference === 100;\n // Difference with this handle is smaller than the previously checked handle\n var isCloser = differenceWithThisHandle < smallestDifference;\n var isCloserAfter = differenceWithThisHandle <= smallestDifference && clickedPosition > handlePosition;\n if (isCloser || isCloserAfter || clickAtEdge) {\n handleNumber = index;\n smallestDifference = differenceWithThisHandle;\n }\n });\n return handleNumber;\n }\n // Fire 'end' when a mouse or pen leaves the document.\n function documentLeave(event, data) {\n if (event.type === \"mouseout\" &&\n event.target.nodeName === \"HTML\" &&\n event.relatedTarget === null) {\n eventEnd(event, data);\n }\n }\n // Handle movement on document for handle and range drag.\n function eventMove(event, data) {\n // Fix #498\n // Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\n // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\n // IE9 has .buttons and .which zero on mousemove.\n // Firefox breaks the spec MDN defines.\n if (navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0) {\n return eventEnd(event, data);\n }\n // Check if we are moving up or down\n var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\n // Convert the movement into a percentage of the slider width/height\n var proposal = (movement * 100) / data.baseSize;\n moveHandles(movement > 0, proposal, data.locations, data.handleNumbers, data.connect);\n }\n // Unbind move events on document, call callbacks.\n function eventEnd(event, data) {\n // The handle is no longer active, so remove the class.\n if (data.handle) {\n removeClass(data.handle, options.cssClasses.active);\n scope_ActiveHandlesCount -= 1;\n }\n // Unbind the move and end events, which are added on 'start'.\n data.listeners.forEach(function (c) {\n scope_DocumentElement.removeEventListener(c[0], c[1]);\n });\n if (scope_ActiveHandlesCount === 0) {\n // Remove dragging class.\n removeClass(scope_Target, options.cssClasses.drag);\n setZindex();\n // Remove cursor styles and text-selection events bound to the body.\n if (event.cursor) {\n scope_Body.style.cursor = \"\";\n scope_Body.removeEventListener(\"selectstart\", preventDefault);\n }\n }\n if (options.events.smoothSteps) {\n data.handleNumbers.forEach(function (handleNumber) {\n setHandle(handleNumber, scope_Locations[handleNumber], true, true, false, false);\n });\n data.handleNumbers.forEach(function (handleNumber) {\n fireEvent(\"update\", handleNumber);\n });\n }\n data.handleNumbers.forEach(function (handleNumber) {\n fireEvent(\"change\", handleNumber);\n fireEvent(\"set\", handleNumber);\n fireEvent(\"end\", handleNumber);\n });\n }\n // Bind move events on document.\n function eventStart(event, data) {\n // Ignore event if any handle is disabled\n if (data.handleNumbers.some(isHandleDisabled)) {\n return;\n }\n var handle;\n if (data.handleNumbers.length === 1) {\n var handleOrigin = scope_Handles[data.handleNumbers[0]];\n handle = handleOrigin.children[0];\n scope_ActiveHandlesCount += 1;\n // Mark the handle as 'active' so it can be styled.\n addClass(handle, options.cssClasses.active);\n }\n // A drag should never propagate up to the 'tap' event.\n event.stopPropagation();\n // Record the event listeners.\n var listeners = [];\n // Attach the move and end events.\n var moveEvent = attachEvent(actions.move, scope_DocumentElement, eventMove, {\n // The event target has changed so we need to propagate the original one so that we keep\n // relying on it to extract target touches.\n target: event.target,\n handle: handle,\n connect: data.connect,\n listeners: listeners,\n startCalcPoint: event.calcPoint,\n baseSize: baseSize(),\n pageOffset: event.pageOffset,\n handleNumbers: data.handleNumbers,\n buttonsProperty: event.buttons,\n locations: scope_Locations.slice(),\n });\n var endEvent = attachEvent(actions.end, scope_DocumentElement, eventEnd, {\n target: event.target,\n handle: handle,\n listeners: listeners,\n doNotReject: true,\n handleNumbers: data.handleNumbers,\n });\n var outEvent = attachEvent(\"mouseout\", scope_DocumentElement, documentLeave, {\n target: event.target,\n handle: handle,\n listeners: listeners,\n doNotReject: true,\n handleNumbers: data.handleNumbers,\n });\n // We want to make sure we pushed the listeners in the listener list rather than creating\n // a new one as it has already been passed to the event handlers.\n listeners.push.apply(listeners, moveEvent.concat(endEvent, outEvent));\n // Text selection isn't an issue on touch devices,\n // so adding cursor styles can be skipped.\n if (event.cursor) {\n // Prevent the 'I' cursor and extend the range-drag cursor.\n scope_Body.style.cursor = getComputedStyle(event.target).cursor;\n // Mark the target with a dragging state.\n if (scope_Handles.length > 1) {\n addClass(scope_Target, options.cssClasses.drag);\n }\n // Prevent text selection when dragging the handles.\n // In noUiSlider <= 9.2.0, this was handled by calling preventDefault on mouse/touch start/move,\n // which is scroll blocking. The selectstart event is supported by FireFox starting from version 52,\n // meaning the only holdout is iOS Safari. This doesn't matter: text selection isn't triggered there.\n // The 'cursor' flag is false.\n // See: http://caniuse.com/#search=selectstart\n scope_Body.addEventListener(\"selectstart\", preventDefault, false);\n }\n data.handleNumbers.forEach(function (handleNumber) {\n fireEvent(\"start\", handleNumber);\n });\n }\n // Move closest handle to tapped location.\n function eventTap(event) {\n // The tap event shouldn't propagate up\n event.stopPropagation();\n var proposal = calcPointToPercentage(event.calcPoint);\n var handleNumber = getClosestHandle(proposal);\n // Tackle the case that all handles are 'disabled'.\n if (handleNumber === false) {\n return;\n }\n // Flag the slider as it is now in a transitional state.\n // Transition takes a configurable amount of ms (default 300). Re-enable the slider after that.\n if (!options.events.snap) {\n addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);\n }\n setHandle(handleNumber, proposal, true, true);\n setZindex();\n fireEvent(\"slide\", handleNumber, true);\n fireEvent(\"update\", handleNumber, true);\n if (!options.events.snap) {\n fireEvent(\"change\", handleNumber, true);\n fireEvent(\"set\", handleNumber, true);\n }\n else {\n eventStart(event, { handleNumbers: [handleNumber] });\n }\n }\n // Fires a 'hover' event for a hovered mouse/pen position.\n function eventHover(event) {\n var proposal = calcPointToPercentage(event.calcPoint);\n var to = scope_Spectrum.getStep(proposal);\n var value = scope_Spectrum.fromStepping(to);\n Object.keys(scope_Events).forEach(function (targetEvent) {\n if (\"hover\" === targetEvent.split(\".\")[0]) {\n scope_Events[targetEvent].forEach(function (callback) {\n callback.call(scope_Self, value);\n });\n }\n });\n }\n // Handles keydown on focused handles\n // Don't move the document when pressing arrow keys on focused handles\n function eventKeydown(event, handleNumber) {\n if (isSliderDisabled() || isHandleDisabled(handleNumber)) {\n return false;\n }\n var horizontalKeys = [\"Left\", \"Right\"];\n var verticalKeys = [\"Down\", \"Up\"];\n var largeStepKeys = [\"PageDown\", \"PageUp\"];\n var edgeKeys = [\"Home\", \"End\"];\n if (options.dir && !options.ort) {\n // On an right-to-left slider, the left and right keys act inverted\n horizontalKeys.reverse();\n }\n else if (options.ort && !options.dir) {\n // On a top-to-bottom slider, the up and down keys act inverted\n verticalKeys.reverse();\n largeStepKeys.reverse();\n }\n // Strip \"Arrow\" for IE compatibility. https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key\n var key = event.key.replace(\"Arrow\", \"\");\n var isLargeDown = key === largeStepKeys[0];\n var isLargeUp = key === largeStepKeys[1];\n var isDown = key === verticalKeys[0] || key === horizontalKeys[0] || isLargeDown;\n var isUp = key === verticalKeys[1] || key === horizontalKeys[1] || isLargeUp;\n var isMin = key === edgeKeys[0];\n var isMax = key === edgeKeys[1];\n if (!isDown && !isUp && !isMin && !isMax) {\n return true;\n }\n event.preventDefault();\n var to;\n if (isUp || isDown) {\n var direction = isDown ? 0 : 1;\n var steps = getNextStepsForHandle(handleNumber);\n var step = steps[direction];\n // At the edge of a slider, do nothing\n if (step === null) {\n return false;\n }\n // No step set, use the default of 10% of the sub-range\n if (step === false) {\n step = scope_Spectrum.getDefaultStep(scope_Locations[handleNumber], isDown, options.keyboardDefaultStep);\n }\n if (isLargeUp || isLargeDown) {\n step *= options.keyboardPageMultiplier;\n }\n else {\n step *= options.keyboardMultiplier;\n }\n // Step over zero-length ranges (#948);\n step = Math.max(step, 0.0000001);\n // Decrement for down steps\n step = (isDown ? -1 : 1) * step;\n to = scope_Values[handleNumber] + step;\n }\n else if (isMax) {\n // End key\n to = options.spectrum.xVal[options.spectrum.xVal.length - 1];\n }\n else {\n // Home key\n to = options.spectrum.xVal[0];\n }\n setHandle(handleNumber, scope_Spectrum.toStepping(to), true, true);\n fireEvent(\"slide\", handleNumber);\n fireEvent(\"update\", handleNumber);\n fireEvent(\"change\", handleNumber);\n fireEvent(\"set\", handleNumber);\n return false;\n }\n // Attach events to several slider parts.\n function bindSliderEvents(behaviour) {\n // Attach the standard drag event to the handles.\n if (!behaviour.fixed) {\n scope_Handles.forEach(function (handle, index) {\n // These events are only bound to the visual handle\n // element, not the 'real' origin element.\n attachEvent(actions.start, handle.children[0], eventStart, {\n handleNumbers: [index],\n });\n });\n }\n // Attach the tap event to the slider base.\n if (behaviour.tap) {\n attachEvent(actions.start, scope_Base, eventTap, {});\n }\n // Fire hover events\n if (behaviour.hover) {\n attachEvent(actions.move, scope_Base, eventHover, {\n hover: true,\n });\n }\n // Make the range draggable.\n if (behaviour.drag) {\n scope_Connects.forEach(function (connect, index) {\n if (connect === false || index === 0 || index === scope_Connects.length - 1) {\n return;\n }\n var handleBefore = scope_Handles[index - 1];\n var handleAfter = scope_Handles[index];\n var eventHolders = [connect];\n var handlesToDrag = [handleBefore, handleAfter];\n var handleNumbersToDrag = [index - 1, index];\n addClass(connect, options.cssClasses.draggable);\n // When the range is fixed, the entire range can\n // be dragged by the handles. The handle in the first\n // origin will propagate the start event upward,\n // but it needs to be bound manually on the other.\n if (behaviour.fixed) {\n eventHolders.push(handleBefore.children[0]);\n eventHolders.push(handleAfter.children[0]);\n }\n if (behaviour.dragAll) {\n handlesToDrag = scope_Handles;\n handleNumbersToDrag = scope_HandleNumbers;\n }\n eventHolders.forEach(function (eventHolder) {\n attachEvent(actions.start, eventHolder, eventStart, {\n handles: handlesToDrag,\n handleNumbers: handleNumbersToDrag,\n connect: connect,\n });\n });\n });\n }\n }\n // Attach an event to this slider, possibly including a namespace\n function bindEvent(namespacedEvent, callback) {\n scope_Events[namespacedEvent] = scope_Events[namespacedEvent] || [];\n scope_Events[namespacedEvent].push(callback);\n // If the event bound is 'update,' fire it immediately for all handles.\n if (namespacedEvent.split(\".\")[0] === \"update\") {\n scope_Handles.forEach(function (a, index) {\n fireEvent(\"update\", index);\n });\n }\n }\n function isInternalNamespace(namespace) {\n return namespace === INTERNAL_EVENT_NS.aria || namespace === INTERNAL_EVENT_NS.tooltips;\n }\n // Undo attachment of event\n function removeEvent(namespacedEvent) {\n var event = namespacedEvent && namespacedEvent.split(\".\")[0];\n var namespace = event ? namespacedEvent.substring(event.length) : namespacedEvent;\n Object.keys(scope_Events).forEach(function (bind) {\n var tEvent = bind.split(\".\")[0];\n var tNamespace = bind.substring(tEvent.length);\n if ((!event || event === tEvent) && (!namespace || namespace === tNamespace)) {\n // only delete protected internal event if intentional\n if (!isInternalNamespace(tNamespace) || namespace === tNamespace) {\n delete scope_Events[bind];\n }\n }\n });\n }\n // External event handling\n function fireEvent(eventName, handleNumber, tap) {\n Object.keys(scope_Events).forEach(function (targetEvent) {\n var eventType = targetEvent.split(\".\")[0];\n if (eventName === eventType) {\n scope_Events[targetEvent].forEach(function (callback) {\n callback.call(\n // Use the slider public API as the scope ('this')\n scope_Self, \n // Return values as array, so arg_1[arg_2] is always valid.\n scope_Values.map(options.format.to), \n // Handle index, 0 or 1\n handleNumber, \n // Un-formatted slider values\n scope_Values.slice(), \n // Event is fired by tap, true or false\n tap || false, \n // Left offset of the handle, in relation to the slider\n scope_Locations.slice(), \n // add the slider public API to an accessible parameter when this is unavailable\n scope_Self);\n });\n }\n });\n }\n // Split out the handle positioning logic so the Move event can use it, too\n function checkHandlePosition(reference, handleNumber, to, lookBackward, lookForward, getValue, smoothSteps) {\n var distance;\n // For sliders with multiple handles, limit movement to the other handle.\n // Apply the margin option by adding it to the handle positions.\n if (scope_Handles.length > 1 && !options.events.unconstrained) {\n if (lookBackward && handleNumber > 0) {\n distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber - 1], options.margin, false);\n to = Math.max(to, distance);\n }\n if (lookForward && handleNumber < scope_Handles.length - 1) {\n distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber + 1], options.margin, true);\n to = Math.min(to, distance);\n }\n }\n // The limit option has the opposite effect, limiting handles to a\n // maximum distance from another. Limit must be > 0, as otherwise\n // handles would be unmovable.\n if (scope_Handles.length > 1 && options.limit) {\n if (lookBackward && handleNumber > 0) {\n distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber - 1], options.limit, false);\n to = Math.min(to, distance);\n }\n if (lookForward && handleNumber < scope_Handles.length - 1) {\n distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber + 1], options.limit, true);\n to = Math.max(to, distance);\n }\n }\n // The padding option keeps the handles a certain distance from the\n // edges of the slider. Padding must be > 0.\n if (options.padding) {\n if (handleNumber === 0) {\n distance = scope_Spectrum.getAbsoluteDistance(0, options.padding[0], false);\n to = Math.max(to, distance);\n }\n if (handleNumber === scope_Handles.length - 1) {\n distance = scope_Spectrum.getAbsoluteDistance(100, options.padding[1], true);\n to = Math.min(to, distance);\n }\n }\n if (!smoothSteps) {\n to = scope_Spectrum.getStep(to);\n }\n // Limit percentage to the 0 - 100 range\n to = limit(to);\n // Return false if handle can't move\n if (to === reference[handleNumber] && !getValue) {\n return false;\n }\n return to;\n }\n // Uses slider orientation to create CSS rules. a = base value;\n function inRuleOrder(v, a) {\n var o = options.ort;\n return (o ? a : v) + \", \" + (o ? v : a);\n }\n // Moves handle(s) by a percentage\n // (bool, % to move, [% where handle started, ...], [index in scope_Handles, ...])\n function moveHandles(upward, proposal, locations, handleNumbers, connect) {\n var proposals = locations.slice();\n // Store first handle now, so we still have it in case handleNumbers is reversed\n var firstHandle = handleNumbers[0];\n var smoothSteps = options.events.smoothSteps;\n var b = [!upward, upward];\n var f = [upward, !upward];\n // Copy handleNumbers so we don't change the dataset\n handleNumbers = handleNumbers.slice();\n // Check to see which handle is 'leading'.\n // If that one can't move the second can't either.\n if (upward) {\n handleNumbers.reverse();\n }\n // Step 1: get the maximum percentage that any of the handles can move\n if (handleNumbers.length > 1) {\n handleNumbers.forEach(function (handleNumber, o) {\n var to = checkHandlePosition(proposals, handleNumber, proposals[handleNumber] + proposal, b[o], f[o], false, smoothSteps);\n // Stop if one of the handles can't move.\n if (to === false) {\n proposal = 0;\n }\n else {\n proposal = to - proposals[handleNumber];\n proposals[handleNumber] = to;\n }\n });\n }\n // If using one handle, check backward AND forward\n else {\n b = f = [true];\n }\n var state = false;\n // Step 2: Try to set the handles with the found percentage\n handleNumbers.forEach(function (handleNumber, o) {\n state =\n setHandle(handleNumber, locations[handleNumber] + proposal, b[o], f[o], false, smoothSteps) || state;\n });\n // Step 3: If a handle moved, fire events\n if (state) {\n handleNumbers.forEach(function (handleNumber) {\n fireEvent(\"update\", handleNumber);\n fireEvent(\"slide\", handleNumber);\n });\n // If target is a connect, then fire drag event\n if (connect != undefined) {\n fireEvent(\"drag\", firstHandle);\n }\n }\n }\n // Takes a base value and an offset. This offset is used for the connect bar size.\n // In the initial design for this feature, the origin element was 1% wide.\n // Unfortunately, a rounding bug in Chrome makes it impossible to implement this feature\n // in this manner: https://bugs.chromium.org/p/chromium/issues/detail?id=798223\n function transformDirection(a, b) {\n return options.dir ? 100 - a - b : a;\n }\n // Updates scope_Locations and scope_Values, updates visual state\n function updateHandlePosition(handleNumber, to) {\n // Update locations.\n scope_Locations[handleNumber] = to;\n // Convert the value to the slider stepping/range.\n scope_Values[handleNumber] = scope_Spectrum.fromStepping(to);\n var translation = transformDirection(to, 0) - scope_DirOffset;\n var translateRule = \"translate(\" + inRuleOrder(translation + \"%\", \"0\") + \")\";\n scope_Handles[handleNumber].style[options.transformRule] = translateRule;\n updateConnect(handleNumber);\n updateConnect(handleNumber + 1);\n }\n // Handles before the slider middle are stacked later = higher,\n // Handles after the middle later is lower\n // [[7] [8] .......... | .......... [5] [4]\n function setZindex() {\n scope_HandleNumbers.forEach(function (handleNumber) {\n var dir = scope_Locations[handleNumber] > 50 ? -1 : 1;\n var zIndex = 3 + (scope_Handles.length + dir * handleNumber);\n scope_Handles[handleNumber].style.zIndex = String(zIndex);\n });\n }\n // Test suggested values and apply margin, step.\n // if exactInput is true, don't run checkHandlePosition, then the handle can be placed in between steps (#436)\n function setHandle(handleNumber, to, lookBackward, lookForward, exactInput, smoothSteps) {\n if (!exactInput) {\n to = checkHandlePosition(scope_Locations, handleNumber, to, lookBackward, lookForward, false, smoothSteps);\n }\n if (to === false) {\n return false;\n }\n updateHandlePosition(handleNumber, to);\n return true;\n }\n // Updates style attribute for connect nodes\n function updateConnect(index) {\n // Skip connects set to false\n if (!scope_Connects[index]) {\n return;\n }\n var l = 0;\n var h = 100;\n if (index !== 0) {\n l = scope_Locations[index - 1];\n }\n if (index !== scope_Connects.length - 1) {\n h = scope_Locations[index];\n }\n // We use two rules:\n // 'translate' to change the left/top offset;\n // 'scale' to change the width of the element;\n // As the element has a width of 100%, a translation of 100% is equal to 100% of the parent (.noUi-base)\n var connectWidth = h - l;\n var translateRule = \"translate(\" + inRuleOrder(transformDirection(l, connectWidth) + \"%\", \"0\") + \")\";\n var scaleRule = \"scale(\" + inRuleOrder(connectWidth / 100, \"1\") + \")\";\n scope_Connects[index].style[options.transformRule] =\n translateRule + \" \" + scaleRule;\n }\n // Parses value passed to .set method. Returns current value if not parse-able.\n function resolveToValue(to, handleNumber) {\n // Setting with null indicates an 'ignore'.\n // Inputting 'false' is invalid.\n if (to === null || to === false || to === undefined) {\n return scope_Locations[handleNumber];\n }\n // If a formatted number was passed, attempt to decode it.\n if (typeof to === \"number\") {\n to = String(to);\n }\n to = options.format.from(to);\n if (to !== false) {\n to = scope_Spectrum.toStepping(to);\n }\n // If parsing the number failed, use the current value.\n if (to === false || isNaN(to)) {\n return scope_Locations[handleNumber];\n }\n return to;\n }\n // Set the slider value.\n function valueSet(input, fireSetEvent, exactInput) {\n var values = asArray(input);\n var isInit = scope_Locations[0] === undefined;\n // Event fires by default\n fireSetEvent = fireSetEvent === undefined ? true : fireSetEvent;\n // Animation is optional.\n // Make sure the initial values were set before using animated placement.\n if (options.animate && !isInit) {\n addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);\n }\n // First pass, without lookAhead but with lookBackward. Values are set from left to right.\n scope_HandleNumbers.forEach(function (handleNumber) {\n setHandle(handleNumber, resolveToValue(values[handleNumber], handleNumber), true, false, exactInput);\n });\n var i = scope_HandleNumbers.length === 1 ? 0 : 1;\n // Spread handles evenly across the slider if the range has no size (min=max)\n if (isInit && scope_Spectrum.hasNoSize()) {\n exactInput = true;\n scope_Locations[0] = 0;\n if (scope_HandleNumbers.length > 1) {\n var space_1 = 100 / (scope_HandleNumbers.length - 1);\n scope_HandleNumbers.forEach(function (handleNumber) {\n scope_Locations[handleNumber] = handleNumber * space_1;\n });\n }\n }\n // Secondary passes. Now that all base values are set, apply constraints.\n // Iterate all handles to ensure constraints are applied for the entire slider (Issue #1009)\n for (; i < scope_HandleNumbers.length; ++i) {\n scope_HandleNumbers.forEach(function (handleNumber) {\n setHandle(handleNumber, scope_Locations[handleNumber], true, true, exactInput);\n });\n }\n setZindex();\n scope_HandleNumbers.forEach(function (handleNumber) {\n fireEvent(\"update\", handleNumber);\n // Fire the event only for handles that received a new value, as per #579\n if (values[handleNumber] !== null && fireSetEvent) {\n fireEvent(\"set\", handleNumber);\n }\n });\n }\n // Reset slider to initial values\n function valueReset(fireSetEvent) {\n valueSet(options.start, fireSetEvent);\n }\n // Set value for a single handle\n function valueSetHandle(handleNumber, value, fireSetEvent, exactInput) {\n // Ensure numeric input\n handleNumber = Number(handleNumber);\n if (!(handleNumber >= 0 && handleNumber < scope_HandleNumbers.length)) {\n throw new Error(\"noUiSlider: invalid handle number, got: \" + handleNumber);\n }\n // Look both backward and forward, since we don't want this handle to \"push\" other handles (#960);\n // The exactInput argument can be used to ignore slider stepping (#436)\n setHandle(handleNumber, resolveToValue(value, handleNumber), true, true, exactInput);\n fireEvent(\"update\", handleNumber);\n if (fireSetEvent) {\n fireEvent(\"set\", handleNumber);\n }\n }\n // Get the slider value.\n function valueGet(unencoded) {\n if (unencoded === void 0) { unencoded = false; }\n if (unencoded) {\n // return a copy of the raw values\n return scope_Values.length === 1 ? scope_Values[0] : scope_Values.slice(0);\n }\n var values = scope_Values.map(options.format.to);\n // If only one handle is used, return a single value.\n if (values.length === 1) {\n return values[0];\n }\n return values;\n }\n // Removes classes from the root and empties it.\n function destroy() {\n // remove protected internal listeners\n removeEvent(INTERNAL_EVENT_NS.aria);\n removeEvent(INTERNAL_EVENT_NS.tooltips);\n Object.keys(options.cssClasses).forEach(function (key) {\n removeClass(scope_Target, options.cssClasses[key]);\n });\n while (scope_Target.firstChild) {\n scope_Target.removeChild(scope_Target.firstChild);\n }\n delete scope_Target.noUiSlider;\n }\n function getNextStepsForHandle(handleNumber) {\n var location = scope_Locations[handleNumber];\n var nearbySteps = scope_Spectrum.getNearbySteps(location);\n var value = scope_Values[handleNumber];\n var increment = nearbySteps.thisStep.step;\n var decrement = null;\n // If snapped, directly use defined step value\n if (options.snap) {\n return [\n value - nearbySteps.stepBefore.startValue || null,\n nearbySteps.stepAfter.startValue - value || null,\n ];\n }\n // If the next value in this step moves into the next step,\n // the increment is the start of the next step - the current value\n if (increment !== false) {\n if (value + increment > nearbySteps.stepAfter.startValue) {\n increment = nearbySteps.stepAfter.startValue - value;\n }\n }\n // If the value is beyond the starting point\n if (value > nearbySteps.thisStep.startValue) {\n decrement = nearbySteps.thisStep.step;\n }\n else if (nearbySteps.stepBefore.step === false) {\n decrement = false;\n }\n // If a handle is at the start of a step, it always steps back into the previous step first\n else {\n decrement = value - nearbySteps.stepBefore.highestStep;\n }\n // Now, if at the slider edges, there is no in/decrement\n if (location === 100) {\n increment = null;\n }\n else if (location === 0) {\n decrement = null;\n }\n // As per #391, the comparison for the decrement step can have some rounding issues.\n var stepDecimals = scope_Spectrum.countStepDecimals();\n // Round per #391\n if (increment !== null && increment !== false) {\n increment = Number(increment.toFixed(stepDecimals));\n }\n if (decrement !== null && decrement !== false) {\n decrement = Number(decrement.toFixed(stepDecimals));\n }\n return [decrement, increment];\n }\n // Get the current step size for the slider.\n function getNextSteps() {\n return scope_HandleNumbers.map(getNextStepsForHandle);\n }\n // Updatable: margin, limit, padding, step, range, animate, snap\n function updateOptions(optionsToUpdate, fireSetEvent) {\n // Spectrum is created using the range, snap, direction and step options.\n // 'snap' and 'step' can be updated.\n // If 'snap' and 'step' are not passed, they should remain unchanged.\n var v = valueGet();\n var updateAble = [\n \"margin\",\n \"limit\",\n \"padding\",\n \"range\",\n \"animate\",\n \"snap\",\n \"step\",\n \"format\",\n \"pips\",\n \"tooltips\",\n ];\n // Only change options that we're actually passed to update.\n updateAble.forEach(function (name) {\n // Check for undefined. null removes the value.\n if (optionsToUpdate[name] !== undefined) {\n originalOptions[name] = optionsToUpdate[name];\n }\n });\n var newOptions = testOptions(originalOptions);\n // Load new options into the slider state\n updateAble.forEach(function (name) {\n if (optionsToUpdate[name] !== undefined) {\n options[name] = newOptions[name];\n }\n });\n scope_Spectrum = newOptions.spectrum;\n // Limit, margin and padding depend on the spectrum but are stored outside of it. (#677)\n options.margin = newOptions.margin;\n options.limit = newOptions.limit;\n options.padding = newOptions.padding;\n // Update pips, removes existing.\n if (options.pips) {\n pips(options.pips);\n }\n else {\n removePips();\n }\n // Update tooltips, removes existing.\n if (options.tooltips) {\n tooltips();\n }\n else {\n removeTooltips();\n }\n // Invalidate the current positioning so valueSet forces an update.\n scope_Locations = [];\n valueSet(isSet(optionsToUpdate.start) ? optionsToUpdate.start : v, fireSetEvent);\n }\n // Initialization steps\n function setupSlider() {\n // Create the base element, initialize HTML and set classes.\n // Add handles and connect elements.\n scope_Base = addSlider(scope_Target);\n addElements(options.connect, scope_Base);\n // Attach user events.\n bindSliderEvents(options.events);\n // Use the public value method to set the start values.\n valueSet(options.start);\n if (options.pips) {\n pips(options.pips);\n }\n if (options.tooltips) {\n tooltips();\n }\n aria();\n }\n setupSlider();\n var scope_Self = {\n destroy: destroy,\n steps: getNextSteps,\n on: bindEvent,\n off: removeEvent,\n get: valueGet,\n set: valueSet,\n setHandle: valueSetHandle,\n reset: valueReset,\n // Exposed for unit testing, don't use this in your application.\n __moveHandles: function (upward, proposal, handleNumbers) {\n moveHandles(upward, proposal, scope_Locations, handleNumbers);\n },\n options: originalOptions,\n updateOptions: updateOptions,\n target: scope_Target,\n removePips: removePips,\n removeTooltips: removeTooltips,\n getPositions: function () {\n return scope_Locations.slice();\n },\n getTooltips: function () {\n return scope_Tooltips;\n },\n getOrigins: function () {\n return scope_Handles;\n },\n pips: pips, // Issue #594\n };\n return scope_Self;\n }\n // Run the standard initializer\n function initialize(target, originalOptions) {\n if (!target || !target.nodeName) {\n throw new Error(\"noUiSlider: create requires a single element, got: \" + target);\n }\n // Throw an error if the slider was already initialized.\n if (target.noUiSlider) {\n throw new Error(\"noUiSlider: Slider was already initialized.\");\n }\n // Test the options and create the slider environment;\n var options = testOptions(originalOptions);\n var api = scope(target, options, originalOptions);\n target.noUiSlider = api;\n return api;\n }\n var nouislider = {\n // Exposed for unit testing, don't use this in your application.\n __spectrum: Spectrum,\n // A reference to the default classes, allows global changes.\n // Use the cssClasses option for changes to one slider.\n cssClasses: cssClasses,\n create: initialize,\n };\n\n exports.create = initialize;\n exports.cssClasses = cssClasses;\n exports[\"default\"] = nouislider;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n","/**\n* Tom Select v2.1.0\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n*/\n\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.TomSelect = factory());\n})(this, (function () { 'use strict';\n\n\t/**\n\t * MicroEvent - to make any js object an event emitter\n\t *\n\t * - pure javascript - server compatible, browser compatible\n\t * - dont rely on the browser doms\n\t * - super simple - you get it immediatly, no mistery, no magic involved\n\t *\n\t * @author Jerome Etienne (https://github.com/jeromeetienne)\n\t */\n\n\t/**\n\t * Execute callback for each event in space separated list of event names\n\t *\n\t */\n\tfunction forEvents(events, callback) {\n\t events.split(/\\s+/).forEach(event => {\n\t callback(event);\n\t });\n\t}\n\n\tclass MicroEvent {\n\t constructor() {\n\t this._events = void 0;\n\t this._events = {};\n\t }\n\n\t on(events, fct) {\n\t forEvents(events, event => {\n\t this._events[event] = this._events[event] || [];\n\n\t this._events[event].push(fct);\n\t });\n\t }\n\n\t off(events, fct) {\n\t var n = arguments.length;\n\n\t if (n === 0) {\n\t this._events = {};\n\t return;\n\t }\n\n\t forEvents(events, event => {\n\t if (n === 1) return delete this._events[event];\n\t if (event in this._events === false) return;\n\n\t this._events[event].splice(this._events[event].indexOf(fct), 1);\n\t });\n\t }\n\n\t trigger(events, ...args) {\n\t var self = this;\n\t forEvents(events, event => {\n\t if (event in self._events === false) return;\n\n\t for (let fct of self._events[event]) {\n\t fct.apply(self, args);\n\t }\n\t });\n\t }\n\n\t}\n\n\t/**\n\t * microplugin.js\n\t * Copyright (c) 2013 Brian Reavis & contributors\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this\n\t * file except in compliance with the License. You may obtain a copy of the License at:\n\t * http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software distributed under\n\t * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF\n\t * ANY KIND, either express or implied. See the License for the specific language\n\t * governing permissions and limitations under the License.\n\t *\n\t * @author Brian Reavis \n\t */\n\tfunction MicroPlugin(Interface) {\n\t Interface.plugins = {};\n\t return class extends Interface {\n\t constructor(...args) {\n\t super(...args);\n\t this.plugins = {\n\t names: [],\n\t settings: {},\n\t requested: {},\n\t loaded: {}\n\t };\n\t }\n\n\t /**\n\t * Registers a plugin.\n\t *\n\t * @param {function} fn\n\t */\n\t static define(name, fn) {\n\t Interface.plugins[name] = {\n\t 'name': name,\n\t 'fn': fn\n\t };\n\t }\n\t /**\n\t * Initializes the listed plugins (with options).\n\t * Acceptable formats:\n\t *\n\t * List (without options):\n\t * ['a', 'b', 'c']\n\t *\n\t * List (with options):\n\t * [{'name': 'a', options: {}}, {'name': 'b', options: {}}]\n\t *\n\t * Hash (with options):\n\t * {'a': { ... }, 'b': { ... }, 'c': { ... }}\n\t *\n\t * @param {array|object} plugins\n\t */\n\n\n\t initializePlugins(plugins) {\n\t var key, name;\n\t const self = this;\n\t const queue = [];\n\n\t if (Array.isArray(plugins)) {\n\t plugins.forEach(plugin => {\n\t if (typeof plugin === 'string') {\n\t queue.push(plugin);\n\t } else {\n\t self.plugins.settings[plugin.name] = plugin.options;\n\t queue.push(plugin.name);\n\t }\n\t });\n\t } else if (plugins) {\n\t for (key in plugins) {\n\t if (plugins.hasOwnProperty(key)) {\n\t self.plugins.settings[key] = plugins[key];\n\t queue.push(key);\n\t }\n\t }\n\t }\n\n\t while (name = queue.shift()) {\n\t self.require(name);\n\t }\n\t }\n\n\t loadPlugin(name) {\n\t var self = this;\n\t var plugins = self.plugins;\n\t var plugin = Interface.plugins[name];\n\n\t if (!Interface.plugins.hasOwnProperty(name)) {\n\t throw new Error('Unable to find \"' + name + '\" plugin');\n\t }\n\n\t plugins.requested[name] = true;\n\t plugins.loaded[name] = plugin.fn.apply(self, [self.plugins.settings[name] || {}]);\n\t plugins.names.push(name);\n\t }\n\t /**\n\t * Initializes a plugin.\n\t *\n\t */\n\n\n\t require(name) {\n\t var self = this;\n\t var plugins = self.plugins;\n\n\t if (!self.plugins.loaded.hasOwnProperty(name)) {\n\t if (plugins.requested[name]) {\n\t throw new Error('Plugin has circular dependency (\"' + name + '\")');\n\t }\n\n\t self.loadPlugin(name);\n\t }\n\n\t return plugins.loaded[name];\n\t }\n\n\t };\n\t}\n\n\t// @ts-ignore TS2691 \"An import path cannot end with a '.ts' extension\"\n\t// https://github.com/andrewrk/node-diacritics/blob/master/index.js\n\tvar latin_pat;\n\tconst accent_pat = '[\\u0300-\\u036F\\u{b7}\\u{2be}]'; // \\u{2bc}\n\n\tconst accent_reg = new RegExp(accent_pat, 'gu');\n\tvar diacritic_patterns;\n\tconst latin_convert = {\n\t 'æ': 'ae',\n\t 'ⱥ': 'a',\n\t 'ø': 'o'\n\t};\n\tconst convert_pat = new RegExp(Object.keys(latin_convert).join('|'), 'gu');\n\tconst code_points = [[0, 65535]];\n\t/**\n\t * Remove accents\n\t * via https://github.com/krisk/Fuse/issues/133#issuecomment-318692703\n\t *\n\t */\n\n\tconst asciifold = str => {\n\t return str.normalize('NFKD').replace(accent_reg, '').toLowerCase().replace(convert_pat, function (foreignletter) {\n\t return latin_convert[foreignletter];\n\t });\n\t};\n\t/**\n\t * Convert array of strings to a regular expression\n\t *\tex ['ab','a'] => (?:ab|a)\n\t * \tex ['a','b'] => [ab]\n\t *\n\t */\n\n\tconst arrayToPattern = (chars, glue = '|') => {\n\t if (chars.length == 1) {\n\t return chars[0];\n\t }\n\n\t var longest = 1;\n\t chars.forEach(a => {\n\t longest = Math.max(longest, a.length);\n\t });\n\n\t if (longest == 1) {\n\t return '[' + chars.join('') + ']';\n\t }\n\n\t return '(?:' + chars.join(glue) + ')';\n\t};\n\tconst escapeToPattern = chars => {\n\t const escaped = chars.map(diacritic => escape_regex(diacritic));\n\t return arrayToPattern(escaped);\n\t};\n\t/**\n\t * Get all possible combinations of substrings that add up to the given string\n\t * https://stackoverflow.com/questions/30169587/find-all-the-combination-of-substrings-that-add-up-to-the-given-string\n\t *\n\t */\n\n\tconst allSubstrings = input => {\n\t if (input.length === 1) return [[input]];\n\t var result = [];\n\t allSubstrings(input.substring(1)).forEach(function (subresult) {\n\t var tmp = subresult.slice(0);\n\t tmp[0] = input.charAt(0) + tmp[0];\n\t result.push(tmp);\n\t tmp = subresult.slice(0);\n\t tmp.unshift(input.charAt(0));\n\t result.push(tmp);\n\t });\n\t return result;\n\t};\n\t/**\n\t * Generate a list of diacritics from the list of code points\n\t *\n\t */\n\n\tconst generateDiacritics = code_points => {\n\t var diacritics = {};\n\t code_points.forEach(code_range => {\n\t for (let i = code_range[0]; i <= code_range[1]; i++) {\n\t let diacritic = String.fromCharCode(i);\n\t let latin = asciifold(diacritic);\n\n\t if (latin == diacritic.toLowerCase()) {\n\t continue;\n\t } // skip when latin is a string longer than 3 characters long\n\t // bc the resulting regex patterns will be long\n\t // eg:\n\t // latin صلى الله عليه وسلم length 18 code point 65018\n\t // latin جل جلاله length 8 code point 65019\n\n\n\t if (latin.length > 3) {\n\t continue;\n\t }\n\n\t if (!(latin in diacritics)) {\n\t diacritics[latin] = [latin];\n\t }\n\n\t var patt = new RegExp(escapeToPattern(diacritics[latin]), 'iu');\n\n\t if (diacritic.match(patt)) {\n\t continue;\n\t }\n\n\t diacritics[latin].push(diacritic);\n\t }\n\t }); // filter out if there's only one character in the list\n\n\t let latin_chars = Object.keys(diacritics);\n\n\t for (let i = 0; i < latin_chars.length; i++) {\n\t const latin = latin_chars[i];\n\n\t if (diacritics[latin].length < 2) {\n\t delete diacritics[latin];\n\t }\n\t } // latin character pattern\n\t // match longer substrings first\n\n\n\t latin_chars = Object.keys(diacritics).sort((a, b) => b.length - a.length);\n\t latin_pat = new RegExp('(' + escapeToPattern(latin_chars) + accent_pat + '*)', 'gu'); // build diacritic patterns\n\t // ae needs:\n\t //\t(?:(?:ae|Æ|Ǽ|Ǣ)|(?:A|Ⓐ|A...)(?:E|ɛ|Ⓔ...))\n\n\t var diacritic_patterns = {};\n\t latin_chars.sort((a, b) => a.length - b.length).forEach(latin => {\n\t var substrings = allSubstrings(latin);\n\t var pattern = substrings.map(sub_pat => {\n\t sub_pat = sub_pat.map(l => {\n\t if (diacritics.hasOwnProperty(l)) {\n\t return escapeToPattern(diacritics[l]);\n\t }\n\n\t return l;\n\t });\n\t return arrayToPattern(sub_pat, '');\n\t });\n\t diacritic_patterns[latin] = arrayToPattern(pattern);\n\t });\n\t return diacritic_patterns;\n\t};\n\t/**\n\t * Expand a regular expression pattern to include diacritics\n\t * \teg /a/ becomes /aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐɑAⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ/\n\t *\n\t */\n\n\tconst diacriticRegexPoints = regex => {\n\t if (diacritic_patterns === undefined) {\n\t diacritic_patterns = generateDiacritics(code_points);\n\t }\n\n\t const decomposed = regex.normalize('NFKD').toLowerCase();\n\t return decomposed.split(latin_pat).map(part => {\n\t // \"ffl\" or \"ffl\"\n\t const no_accent = asciifold(part);\n\n\t if (no_accent == '') {\n\t return '';\n\t }\n\n\t if (diacritic_patterns.hasOwnProperty(no_accent)) {\n\t return diacritic_patterns[no_accent];\n\t }\n\n\t return part;\n\t }).join('');\n\t};\n\n\t// @ts-ignore TS2691 \"An import path cannot end with a '.ts' extension\"\n\n\t/**\n\t * A property getter resolving dot-notation\n\t * @param {Object} obj The root object to fetch property on\n\t * @param {String} name The optionally dotted property name to fetch\n\t * @return {Object} The resolved property value\n\t */\n\tconst getAttr = (obj, name) => {\n\t if (!obj) return;\n\t return obj[name];\n\t};\n\t/**\n\t * A property getter resolving dot-notation\n\t * @param {Object} obj The root object to fetch property on\n\t * @param {String} name The optionally dotted property name to fetch\n\t * @return {Object} The resolved property value\n\t */\n\n\tconst getAttrNesting = (obj, name) => {\n\t if (!obj) return;\n\t var part,\n\t names = name.split(\".\");\n\n\t while ((part = names.shift()) && (obj = obj[part]));\n\n\t return obj;\n\t};\n\t/**\n\t * Calculates how close of a match the\n\t * given value is against a search token.\n\t *\n\t */\n\n\tconst scoreValue = (value, token, weight) => {\n\t var score, pos;\n\t if (!value) return 0;\n\t value = value + '';\n\t pos = value.search(token.regex);\n\t if (pos === -1) return 0;\n\t score = token.string.length / value.length;\n\t if (pos === 0) score += 0.5;\n\t return score * weight;\n\t};\n\t/**\n\t *\n\t * https://stackoverflow.com/questions/63006601/why-does-u-throw-an-invalid-escape-error\n\t */\n\n\tconst escape_regex = str => {\n\t return (str + '').replace(/([\\$\\(-\\+\\.\\?\\[-\\^\\{-\\}])/g, '\\\\$1');\n\t};\n\t/**\n\t * Cast object property to an array if it exists and has a value\n\t *\n\t */\n\n\tconst propToArray = (obj, key) => {\n\t var value = obj[key];\n\t if (typeof value == 'function') return value;\n\n\t if (value && !Array.isArray(value)) {\n\t obj[key] = [value];\n\t }\n\t};\n\t/**\n\t * Iterates over arrays and hashes.\n\t *\n\t * ```\n\t * iterate(this.items, function(item, id) {\n\t * // invoked for each item\n\t * });\n\t * ```\n\t *\n\t */\n\n\tconst iterate = (object, callback) => {\n\t if (Array.isArray(object)) {\n\t object.forEach(callback);\n\t } else {\n\t for (var key in object) {\n\t if (object.hasOwnProperty(key)) {\n\t callback(object[key], key);\n\t }\n\t }\n\t }\n\t};\n\tconst cmp = (a, b) => {\n\t if (typeof a === 'number' && typeof b === 'number') {\n\t return a > b ? 1 : a < b ? -1 : 0;\n\t }\n\n\t a = asciifold(a + '').toLowerCase();\n\t b = asciifold(b + '').toLowerCase();\n\t if (a > b) return 1;\n\t if (b > a) return -1;\n\t return 0;\n\t};\n\n\t/**\n\t * sifter.js\n\t * Copyright (c) 2013–2020 Brian Reavis & contributors\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this\n\t * file except in compliance with the License. You may obtain a copy of the License at:\n\t * http://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software distributed under\n\t * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF\n\t * ANY KIND, either express or implied. See the License for the specific language\n\t * governing permissions and limitations under the License.\n\t *\n\t * @author Brian Reavis \n\t */\n\n\tclass Sifter {\n\t // []|{};\n\n\t /**\n\t * Textually searches arrays and hashes of objects\n\t * by property (or multiple properties). Designed\n\t * specifically for autocomplete.\n\t *\n\t */\n\t constructor(items, settings) {\n\t this.items = void 0;\n\t this.settings = void 0;\n\t this.items = items;\n\t this.settings = settings || {\n\t diacritics: true\n\t };\n\t }\n\n\t /**\n\t * Splits a search string into an array of individual\n\t * regexps to be used to match results.\n\t *\n\t */\n\t tokenize(query, respect_word_boundaries, weights) {\n\t if (!query || !query.length) return [];\n\t const tokens = [];\n\t const words = query.split(/\\s+/);\n\t var field_regex;\n\n\t if (weights) {\n\t field_regex = new RegExp('^(' + Object.keys(weights).map(escape_regex).join('|') + ')\\:(.*)$');\n\t }\n\n\t words.forEach(word => {\n\t let field_match;\n\t let field = null;\n\t let regex = null; // look for \"field:query\" tokens\n\n\t if (field_regex && (field_match = word.match(field_regex))) {\n\t field = field_match[1];\n\t word = field_match[2];\n\t }\n\n\t if (word.length > 0) {\n\t if (this.settings.diacritics) {\n\t regex = diacriticRegexPoints(word);\n\t } else {\n\t regex = escape_regex(word);\n\t }\n\n\t if (respect_word_boundaries) regex = \"\\\\b\" + regex;\n\t }\n\n\t tokens.push({\n\t string: word,\n\t regex: regex ? new RegExp(regex, 'iu') : null,\n\t field: field\n\t });\n\t });\n\t return tokens;\n\t }\n\n\t /**\n\t * Returns a function to be used to score individual results.\n\t *\n\t * Good matches will have a higher score than poor matches.\n\t * If an item is not a match, 0 will be returned by the function.\n\t *\n\t * @returns {function}\n\t */\n\t getScoreFunction(query, options) {\n\t var search = this.prepareSearch(query, options);\n\t return this._getScoreFunction(search);\n\t }\n\n\t _getScoreFunction(search) {\n\t const tokens = search.tokens,\n\t token_count = tokens.length;\n\n\t if (!token_count) {\n\t return function () {\n\t return 0;\n\t };\n\t }\n\n\t const fields = search.options.fields,\n\t weights = search.weights,\n\t field_count = fields.length,\n\t getAttrFn = search.getAttrFn;\n\n\t if (!field_count) {\n\t return function () {\n\t return 1;\n\t };\n\t }\n\t /**\n\t * Calculates the score of an object\n\t * against the search query.\n\t *\n\t */\n\n\n\t const scoreObject = function () {\n\t if (field_count === 1) {\n\t return function (token, data) {\n\t const field = fields[0].field;\n\t return scoreValue(getAttrFn(data, field), token, weights[field]);\n\t };\n\t }\n\n\t return function (token, data) {\n\t var sum = 0; // is the token specific to a field?\n\n\t if (token.field) {\n\t const value = getAttrFn(data, token.field);\n\n\t if (!token.regex && value) {\n\t sum += 1 / field_count;\n\t } else {\n\t sum += scoreValue(value, token, 1);\n\t }\n\t } else {\n\t iterate(weights, (weight, field) => {\n\t sum += scoreValue(getAttrFn(data, field), token, weight);\n\t });\n\t }\n\n\t return sum / field_count;\n\t };\n\t }();\n\n\t if (token_count === 1) {\n\t return function (data) {\n\t return scoreObject(tokens[0], data);\n\t };\n\t }\n\n\t if (search.options.conjunction === 'and') {\n\t return function (data) {\n\t var i = 0,\n\t score,\n\t sum = 0;\n\n\t for (; i < token_count; i++) {\n\t score = scoreObject(tokens[i], data);\n\t if (score <= 0) return 0;\n\t sum += score;\n\t }\n\n\t return sum / token_count;\n\t };\n\t } else {\n\t return function (data) {\n\t var sum = 0;\n\t iterate(tokens, token => {\n\t sum += scoreObject(token, data);\n\t });\n\t return sum / token_count;\n\t };\n\t }\n\t }\n\n\t /**\n\t * Returns a function that can be used to compare two\n\t * results, for sorting purposes. If no sorting should\n\t * be performed, `null` will be returned.\n\t *\n\t * @return function(a,b)\n\t */\n\t getSortFunction(query, options) {\n\t var search = this.prepareSearch(query, options);\n\t return this._getSortFunction(search);\n\t }\n\n\t _getSortFunction(search) {\n\t var i, n, implicit_score;\n\t const self = this,\n\t options = search.options,\n\t sort = !search.query && options.sort_empty ? options.sort_empty : options.sort,\n\t sort_flds = [],\n\t multipliers = [];\n\n\t if (typeof sort == 'function') {\n\t return sort.bind(this);\n\t }\n\t /**\n\t * Fetches the specified sort field value\n\t * from a search result item.\n\t *\n\t */\n\n\n\t const get_field = function get_field(name, result) {\n\t if (name === '$score') return result.score;\n\t return search.getAttrFn(self.items[result.id], name);\n\t }; // parse options\n\n\n\t if (sort) {\n\t for (i = 0, n = sort.length; i < n; i++) {\n\t if (search.query || sort[i].field !== '$score') {\n\t sort_flds.push(sort[i]);\n\t }\n\t }\n\t } // the \"$score\" field is implied to be the primary\n\t // sort field, unless it's manually specified\n\n\n\t if (search.query) {\n\t implicit_score = true;\n\n\t for (i = 0, n = sort_flds.length; i < n; i++) {\n\t if (sort_flds[i].field === '$score') {\n\t implicit_score = false;\n\t break;\n\t }\n\t }\n\n\t if (implicit_score) {\n\t sort_flds.unshift({\n\t field: '$score',\n\t direction: 'desc'\n\t });\n\t }\n\t } else {\n\t for (i = 0, n = sort_flds.length; i < n; i++) {\n\t if (sort_flds[i].field === '$score') {\n\t sort_flds.splice(i, 1);\n\t break;\n\t }\n\t }\n\t }\n\n\t for (i = 0, n = sort_flds.length; i < n; i++) {\n\t multipliers.push(sort_flds[i].direction === 'desc' ? -1 : 1);\n\t } // build function\n\n\n\t const sort_flds_count = sort_flds.length;\n\n\t if (!sort_flds_count) {\n\t return null;\n\t } else if (sort_flds_count === 1) {\n\t const sort_fld = sort_flds[0].field;\n\t const multiplier = multipliers[0];\n\t return function (a, b) {\n\t return multiplier * cmp(get_field(sort_fld, a), get_field(sort_fld, b));\n\t };\n\t } else {\n\t return function (a, b) {\n\t var i, result, field;\n\n\t for (i = 0; i < sort_flds_count; i++) {\n\t field = sort_flds[i].field;\n\t result = multipliers[i] * cmp(get_field(field, a), get_field(field, b));\n\t if (result) return result;\n\t }\n\n\t return 0;\n\t };\n\t }\n\t }\n\n\t /**\n\t * Parses a search query and returns an object\n\t * with tokens and fields ready to be populated\n\t * with results.\n\t *\n\t */\n\t prepareSearch(query, optsUser) {\n\t const weights = {};\n\t var options = Object.assign({}, optsUser);\n\t propToArray(options, 'sort');\n\t propToArray(options, 'sort_empty'); // convert fields to new format\n\n\t if (options.fields) {\n\t propToArray(options, 'fields');\n\t const fields = [];\n\t options.fields.forEach(field => {\n\t if (typeof field == 'string') {\n\t field = {\n\t field: field,\n\t weight: 1\n\t };\n\t }\n\n\t fields.push(field);\n\t weights[field.field] = 'weight' in field ? field.weight : 1;\n\t });\n\t options.fields = fields;\n\t }\n\n\t return {\n\t options: options,\n\t query: query.toLowerCase().trim(),\n\t tokens: this.tokenize(query, options.respect_word_boundaries, weights),\n\t total: 0,\n\t items: [],\n\t weights: weights,\n\t getAttrFn: options.nesting ? getAttrNesting : getAttr\n\t };\n\t }\n\n\t /**\n\t * Searches through all items and returns a sorted array of matches.\n\t *\n\t */\n\t search(query, options) {\n\t var self = this,\n\t score,\n\t search;\n\t search = this.prepareSearch(query, options);\n\t options = search.options;\n\t query = search.query; // generate result scoring function\n\n\t const fn_score = options.score || self._getScoreFunction(search); // perform search and sort\n\n\n\t if (query.length) {\n\t iterate(self.items, (item, id) => {\n\t score = fn_score(item);\n\n\t if (options.filter === false || score > 0) {\n\t search.items.push({\n\t 'score': score,\n\t 'id': id\n\t });\n\t }\n\t });\n\t } else {\n\t iterate(self.items, (_, id) => {\n\t search.items.push({\n\t 'score': 1,\n\t 'id': id\n\t });\n\t });\n\t }\n\n\t const fn_sort = self._getSortFunction(search);\n\n\t if (fn_sort) search.items.sort(fn_sort); // apply limits\n\n\t search.total = search.items.length;\n\n\t if (typeof options.limit === 'number') {\n\t search.items = search.items.slice(0, options.limit);\n\t }\n\n\t return search;\n\t }\n\n\t}\n\n\t/**\n\t * Return a dom element from either a dom query string, jQuery object, a dom element or html string\n\t * https://stackoverflow.com/questions/494143/creating-a-new-dom-element-from-an-html-string-using-built-in-dom-methods-or-pro/35385518#35385518\n\t *\n\t * param query should be {}\n\t */\n\n\tconst getDom = query => {\n\t if (query.jquery) {\n\t return query[0];\n\t }\n\n\t if (query instanceof HTMLElement) {\n\t return query;\n\t }\n\n\t if (isHtmlString(query)) {\n\t let div = document.createElement('div');\n\t div.innerHTML = query.trim(); // Never return a text node of whitespace as the result\n\n\t return div.firstChild;\n\t }\n\n\t return document.querySelector(query);\n\t};\n\tconst isHtmlString = arg => {\n\t if (typeof arg === 'string' && arg.indexOf('<') > -1) {\n\t return true;\n\t }\n\n\t return false;\n\t};\n\tconst escapeQuery = query => {\n\t return query.replace(/['\"\\\\]/g, '\\\\$&');\n\t};\n\t/**\n\t * Dispatch an event\n\t *\n\t */\n\n\tconst triggerEvent = (dom_el, event_name) => {\n\t var event = document.createEvent('HTMLEvents');\n\t event.initEvent(event_name, true, false);\n\t dom_el.dispatchEvent(event);\n\t};\n\t/**\n\t * Apply CSS rules to a dom element\n\t *\n\t */\n\n\tconst applyCSS = (dom_el, css) => {\n\t Object.assign(dom_el.style, css);\n\t};\n\t/**\n\t * Add css classes\n\t *\n\t */\n\n\tconst addClasses = (elmts, ...classes) => {\n\t var norm_classes = classesArray(classes);\n\t elmts = castAsArray(elmts);\n\t elmts.map(el => {\n\t norm_classes.map(cls => {\n\t el.classList.add(cls);\n\t });\n\t });\n\t};\n\t/**\n\t * Remove css classes\n\t *\n\t */\n\n\tconst removeClasses = (elmts, ...classes) => {\n\t var norm_classes = classesArray(classes);\n\t elmts = castAsArray(elmts);\n\t elmts.map(el => {\n\t norm_classes.map(cls => {\n\t el.classList.remove(cls);\n\t });\n\t });\n\t};\n\t/**\n\t * Return arguments\n\t *\n\t */\n\n\tconst classesArray = args => {\n\t var classes = [];\n\t iterate(args, _classes => {\n\t if (typeof _classes === 'string') {\n\t _classes = _classes.trim().split(/[\\11\\12\\14\\15\\40]/);\n\t }\n\n\t if (Array.isArray(_classes)) {\n\t classes = classes.concat(_classes);\n\t }\n\t });\n\t return classes.filter(Boolean);\n\t};\n\t/**\n\t * Create an array from arg if it's not already an array\n\t *\n\t */\n\n\tconst castAsArray = arg => {\n\t if (!Array.isArray(arg)) {\n\t arg = [arg];\n\t }\n\n\t return arg;\n\t};\n\t/**\n\t * Get the closest node to the evt.target matching the selector\n\t * Stops at wrapper\n\t *\n\t */\n\n\tconst parentMatch = (target, selector, wrapper) => {\n\t if (wrapper && !wrapper.contains(target)) {\n\t return;\n\t }\n\n\t while (target && target.matches) {\n\t if (target.matches(selector)) {\n\t return target;\n\t }\n\n\t target = target.parentNode;\n\t }\n\t};\n\t/**\n\t * Get the first or last item from an array\n\t *\n\t * > 0 - right (last)\n\t * <= 0 - left (first)\n\t *\n\t */\n\n\tconst getTail = (list, direction = 0) => {\n\t if (direction > 0) {\n\t return list[list.length - 1];\n\t }\n\n\t return list[0];\n\t};\n\t/**\n\t * Return true if an object is empty\n\t *\n\t */\n\n\tconst isEmptyObject = obj => {\n\t return Object.keys(obj).length === 0;\n\t};\n\t/**\n\t * Get the index of an element amongst sibling nodes of the same type\n\t *\n\t */\n\n\tconst nodeIndex = (el, amongst) => {\n\t if (!el) return -1;\n\t amongst = amongst || el.nodeName;\n\t var i = 0;\n\n\t while (el = el.previousElementSibling) {\n\t if (el.matches(amongst)) {\n\t i++;\n\t }\n\t }\n\n\t return i;\n\t};\n\t/**\n\t * Set attributes of an element\n\t *\n\t */\n\n\tconst setAttr = (el, attrs) => {\n\t iterate(attrs, (val, attr) => {\n\t if (val == null) {\n\t el.removeAttribute(attr);\n\t } else {\n\t el.setAttribute(attr, '' + val);\n\t }\n\t });\n\t};\n\t/**\n\t * Replace a node\n\t */\n\n\tconst replaceNode = (existing, replacement) => {\n\t if (existing.parentNode) existing.parentNode.replaceChild(replacement, existing);\n\t};\n\n\t/**\n\t * highlight v3 | MIT license | Johann Burkard \n\t * Highlights arbitrary terms in a node.\n\t *\n\t * - Modified by Marshal 2011-6-24 (added regex)\n\t * - Modified by Brian Reavis 2012-8-27 (cleanup)\n\t */\n\tconst highlight = (element, regex) => {\n\t if (regex === null) return; // convet string to regex\n\n\t if (typeof regex === 'string') {\n\t if (!regex.length) return;\n\t regex = new RegExp(regex, 'i');\n\t } // Wrap matching part of text node with highlighting , e.g.\n\t // Soccer -> Soccer for regex = /soc/i\n\n\n\t const highlightText = node => {\n\t var match = node.data.match(regex);\n\n\t if (match && node.data.length > 0) {\n\t var spannode = document.createElement('span');\n\t spannode.className = 'highlight';\n\t var middlebit = node.splitText(match.index);\n\t middlebit.splitText(match[0].length);\n\t var middleclone = middlebit.cloneNode(true);\n\t spannode.appendChild(middleclone);\n\t replaceNode(middlebit, spannode);\n\t return 1;\n\t }\n\n\t return 0;\n\t }; // Recurse element node, looking for child text nodes to highlight, unless element\n\t // is childless,